Fix sequencing in Pathoc websocket termination test

This commit is contained in:
Aldo Cortesi 2016-06-06 18:17:22 +12:00
parent 21c7218ee3
commit 210c376901
2 changed files with 5 additions and 3 deletions

View File

@ -361,6 +361,7 @@ class Pathoc(tcp.TCPClient):
return
if frm is None:
self.ws_framereader.join()
self.ws_framereader = None
return
yield frm

View File

@ -154,9 +154,10 @@ class TestDaemon(PathocTestDaemon):
)
with c.connect():
c.request("ws:/")
c.request("wf:f'wf:x100'")
[i for i in c.wait(timeout=0, finish=False)]
[i for i in c.wait(timeout=0)]
c.request("wf:f'wf'")
# This should read a frame and close the websocket reader
assert len([i for i in c.wait(timeout=5, finish=False)]) == 1
assert not [i for i in c.wait(timeout=0)]
def test_connect_fail(self):
to = ("foobar", 80)