File tree 1 file changed +7
-16
lines changed 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -93,16 +93,6 @@ const defaultConfiguration = {
93
93
} ;
94
94
95
95
const openConnections = { } ;
96
- const destroyAliveConnections = function ( ) {
97
- for ( const socketId in openConnections ) {
98
- try {
99
- openConnections [ socketId ] . destroy ( ) ;
100
- delete openConnections [ socketId ] ;
101
- } catch ( e ) {
102
- /* */
103
- }
104
- }
105
- } ;
106
96
let parseServer ;
107
97
let server ;
108
98
@@ -175,17 +165,18 @@ beforeAll(async () => {
175
165
176
166
afterEach ( async ( ) => {
177
167
await Parse . User . logOut ( ) ;
178
- // Connection close events are not immediate on node 10+... wait a bit
179
- await sleep ( 0 ) ;
180
- if ( Object . keys ( openConnections ) . length > 0 ) {
181
- console . warn ( 'There were open connections to the server left after the test finished' ) ;
182
- }
183
168
Parse . Storage . _clear ( ) ;
184
169
await TestUtils . destroyAllDataPermanently ( true ) ;
185
- destroyAliveConnections ( ) ;
186
170
if ( didChangeConfiguration ) {
187
171
await reconfigureServer ( ) ;
188
172
}
189
173
} ) ;
190
174
175
+ afterAll ( ( ) => {
176
+ // Jasmine process counts as one open connection
177
+ if ( Object . keys ( openConnections ) . length > 1 ) {
178
+ console . warn ( 'There were open connections to the server left after the test finished' ) ;
179
+ }
180
+ } ) ;
181
+
191
182
module . exports = { twitterAuthData } ;
You can’t perform that action at this time.
0 commit comments