diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-10-19 23:51:25 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-10-19 23:51:25 (GMT) |
commit | d20afad7d4f2d712da5f37a5108979d2a0c5d8ca (patch) | |
tree | 3f9d5a6a517955fb3ca7acbccb2726e3f3338fd4 /Lib/test | |
parent | 0d9eefda3486057dbafd2453f03da39b667ca71d (diff) | |
download | cpython-d20afad7d4f2d712da5f37a5108979d2a0c5d8ca.zip cpython-d20afad7d4f2d712da5f37a5108979d2a0c5d8ca.tar.gz cpython-d20afad7d4f2d712da5f37a5108979d2a0c5d8ca.tar.bz2 |
Issue #19305: try to fix sporadic test_asyncio failure on FreeBSD 10.0
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 098cf71..f0f4810 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -558,13 +558,14 @@ class EventLoopTestsMixin: self.assertEqual(host, '0.0.0.0') client = socket.socket() client.connect(('127.0.0.1', port)) - client.send(b'xxx') + client.sendall(b'xxx') test_utils.run_briefly(self.loop) self.assertIsInstance(proto, MyProto) self.assertEqual('INITIAL', proto.state) test_utils.run_briefly(self.loop) self.assertEqual('CONNECTED', proto.state) - test_utils.run_briefly(self.loop) # windows iocp + test_utils.run_until(self.loop, lambda: proto.nbytes > 0, + timeout=10) self.assertEqual(3, proto.nbytes) # extra info is available @@ -623,6 +624,8 @@ class EventLoopTestsMixin: self.assertIsInstance(proto, MyProto) test_utils.run_briefly(self.loop) self.assertEqual('CONNECTED', proto.state) + test_utils.run_until(self.loop, lambda: proto.nbytes > 0, + timeout=10) self.assertEqual(3, proto.nbytes) # extra info is available |