8000 fix test and add comment · python/cpython@008be56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 008be56

Browse files
fix test and add comment
1 parent fd9cf92 commit 008be56

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/test/test_asyncio/test_proactor_events.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,12 @@ def test_force_close_idempotent(self):
290290
tr._closing = True
291291
tr._force_close(None)
292292
test_utils.run_briefly(self.loop)
293-
self.assertFalse(self.protocol.connection_lost.called)
293+
# See https://github.com/python/cpython/issues/89237
294+
# `protocol.connection_lost` should be called even if
295+
# the transport was closed forcefully otherwise
296+
# the resources held by protocol will never be freed
297+
# and waiters will never be notified leading to hang.
298+
self.assertTrue(self.protocol.connection_lost.called)
294299

295300
def test_fatal_error_2(self):
296301
tr = self.socket_transport()

0 commit comments

Comments
 (0)
0