Skip to content

Commit

Permalink
iostream_test: moved the server.close() call from write the after wri…
Browse files Browse the repository at this point in the history
…te callback to just before the second read_until().
  • Loading branch information
bergundy committed Jul 30, 2012
1 parent 10a2db1 commit 6fb0418
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tornado/test/iostream_test.py
Expand Up @@ -260,11 +260,12 @@ def test_close_callback_with_pending_read(self):
server, client = self.make_iostream_pair()
client.set_close_callback(self.stop)
try:
server.write(OK, server.close)
server.write(OK)
client.read_until(b("\r\n"), self.stop)
res = self.wait()
self.assertEqual(res, OK)

server.close()
client.read_until(b("\r\n"), lambda x: x)
# If _close_callback (self.stop) is not called,
# an AssertionError: Async operation timed out after 5 seconds
Expand Down

0 comments on commit 6fb0418

Please sign in to comment.