File tree 1 file changed +10
-3
lines changed
notebook/services/kernels/tests
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -159,11 +159,18 @@ def test_kernel_handler(self):
159
159
def test_connections (self ):
160
160
kid = self .kern_api .start ().json ()['id' ]
161
161
model = self .kern_api .get (kid ).json ()
162
- assert model ['connections' ] == 0
162
+ self . assertEqual ( model ['connections' ], 0 )
163
163
164
164
ws = self .kern_api .websocket (kid )
165
165
model = self .kern_api .get (kid ).json ()
166
- assert model ['connections' ] == 1
166
+ self . assertEqual ( model ['connections' ], 1 )
167
167
ws .close ()
168
+ # give it some time to close on the other side:
169
+ for i in range (10 )
170
+ model = self .kern_api .get (kid ).json ()
171
+ if model ['connections' ] > 0 :
172
+ time .sleep (0.1 )
173
+ else :
174
+ break
168
175
model = self .kern_api .get (kid ).json ()
169
- assert model ['connections' ] == 0
176
+ self . assertEqual ( model ['connections' ], 0 )
You can’t perform that action at this time.
0 commit comments