From 0a4da491d14b54d80536ee58876c872cf6e3eb29 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 18 Apr 2015 22:54:31 -0400 Subject: [PATCH] Delay shutdown of the IOLoop in sync HTTPClient test. This appears to cause spurious logs in HTTP/2 tests. --- tornado/test/httpclient_test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tornado/test/httpclient_test.py b/tornado/test/httpclient_test.py index abc220ba4..ecc63e4a4 100644 --- a/tornado/test/httpclient_test.py +++ b/tornado/test/httpclient_test.py @@ -550,7 +550,12 @@ class SyncHTTPClientTest(unittest.TestCase): def tearDown(self): def stop_server(): self.server.stop() - self.server_ioloop.stop() + # Delay the shutdown of the IOLoop by one iteration because + # the server may still have some cleanup work left when + # the client finishes with the response (this is noticable + # with http/2, which leaves a Future with an unexamined + # StreamClosedError on the loop). + self.server_ioloop.add_callback(self.server_ioloop.stop) self.server_ioloop.add_callback(stop_server) self.server_thread.join() self.http_client.close() -- 2.47.2