@@ -98,17 +98,12 @@ let parseServer;
98
98
99
99
const reconfigureServer = async ( changedConfiguration = { } ) => {
100
100
if ( parseServer ) {
101
- try {
102
- await parseServer . handleShutdown ( ) ;
103
- // Connection close events are not immediate on node 10+, so wait a bit
104
- sleep ( 0 ) ;
105
- } catch ( e ) {
106
- console . error ( 'Failed to shutdown the server' , e ) ;
107
- }
101
+ await parseServer . handleShutdown ( ) ;
102
+ // Connection close events are not immediate on node 10+, so wait a bit
103
+ sleep ( 0 ) ;
108
104
parseServer = undefined ;
109
105
return reconfigureServer ( changedConfiguration ) ;
110
106
}
111
-
112
107
didChangeConfiguration = Object . keys ( changedConfiguration ) . length !== 0 ;
113
108
const newConfiguration = Object . assign ( { } , defaultConfiguration , changedConfiguration || { } , {
114
109
mountPath,
@@ -171,15 +166,11 @@ beforeAll(async () => {
171
166
} ) ;
172
167
173
168
afterEach ( async ( ) => {
174
- try {
175
- await Parse . User . logOut ( ) ;
176
- Parse . Storage . _clear ( ) ;
177
- await TestUtils . destroyAllDataPermanently ( true ) ;
178
- if ( didChangeConfiguration ) {
179
- await reconfigureServer ( ) ;
180
- }
181
- } catch ( e ) {
182
- console . error ( 'Failed to tear down the server' , e ) ;
169
+ await Parse . User . logOut ( ) ;
170
+ Parse . Storage . _clear ( ) ;
171
+ await TestUtils . destroyAllDataPermanently ( true ) ;
172
+ if ( didChangeConfiguration ) {
173
+ await reconfigureServer ( ) ;
183
174
}
184
175
} ) ;
185
176
0 commit comments