]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Close a websocket client that causes occasional test failures
authorBen Darnell <ben@bendarnell.com>
Sun, 23 Apr 2023 19:15:05 +0000 (15:15 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 24 Apr 2023 01:04:56 +0000 (21:04 -0400)
These failures occur on the build.yml workflow on the emulated arm64
platform: an ill-timed timer firing during test shutdown can result
in a message being logged and the test failing for dirty logs.

tornado/test/websocket_test.py

index f90c5f2c0f6079efdd02cb1545b53b740db7ba7c..0a29ae64609e95bd6c6b57d248908ffb699cabc5 100644 (file)
@@ -807,6 +807,7 @@ class ClientPeriodicPingTest(WebSocketBaseTestCase):
             response = yield ws.read_message()
             self.assertEqual(response, "got ping")
         # TODO: test that the connection gets closed if ping responses stop.
+        ws.close()
 
 
 class ManualPingTest(WebSocketBaseTestCase):