File tree Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -166,33 +166,7 @@ def test_can_send_more(conn):
166166 assert conn .can_send_more () is False
167167
168168
169- def test_recv_disconnected ():
170- sock = socket .socket (socket .AF_INET , socket .SOCK_STREAM )
171- sock .bind (('127.0.0.1' , 0 ))
172- port = sock .getsockname ()[1 ]
173- sock .listen (5 )
174-
175- conn = BrokerConnection ('127.0.0.1' , port , socket .AF_INET )
176- timeout = time .time () + 1
177- while time .time () < timeout :
178- conn .connect ()
179- if conn .connected ():
180- break
181- else :
182- assert False , 'Connection attempt to local socket timed-out ?'
183-
184- conn .send (MetadataRequest [0 ]([]))
185-
186- # Disconnect server socket
187- sock .close ()
188-
189- # Attempt to receive should mark connection as disconnected
190- assert conn .connected ()
191- conn .recv ()
192- assert conn .disconnected ()
193-
194-
195- def test_recv_disconnected_too (_socket , conn ):
169+ def test_recv_disconnected (_socket , conn ):
196170 conn .connect ()
197171 assert conn .connected ()
198172
You can’t perform that action at this time.
0 commit comments