From: Ben Darnell Date: Sun, 19 Apr 2015 02:54:31 +0000 (-0400) Subject: Delay shutdown of the IOLoop in sync HTTPClient test. X-Git-Tag: v4.2.0b1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a4da491d14b54d80536ee58876c872cf6e3eb29;p=thirdparty%2Ftornado.git Delay shutdown of the IOLoop in sync HTTPClient test. This appears to cause spurious logs in HTTP/2 tests. --- 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()