Browse files

iostream_test: moved the server.close() call from write the after wri…

…te callback to just before the second read_until().
  • Loading branch information...
1 parent e200903 commit 9ddbd7c18ac5c09725f03b650539ef6f47c4d5c0 @bergundy bergundy committed with bdarnell Jul 30, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 tornado/test/iostream_test.py
View
3 tornado/test/iostream_test.py
@@ -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

0 comments on commit 9ddbd7c

Please sign in to comment.