Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deadlock in test_remote_shutdown_receives_trailing_data #559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions tests/test_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2663,10 +2663,6 @@ async def client(addr):
self.loop.run_until_complete(client(srv.addr))

def test_remote_shutdown_receives_trailing_data(self):
if sys.platform == 'linux' and sys.version_info < (3, 11):
# TODO: started hanging and needs to be diagnosed.
raise unittest.SkipTest()

CHUNK = 1024 * 16
SIZE = 8
count = 0
Expand Down Expand Up @@ -2774,9 +2770,11 @@ async def client(addr):
writer.transport._test__append_write_backlog(
b'x' * CHUNK)
count += 1

data = await reader.read()
self.assertEqual(data, b'')
try:
data = await asyncio.wait_for(reader.read(), timeout=5.0)
self.assertEqual(data, b'')
except asyncio.TimeoutError:
print("No data received, continue...")

await future

Expand Down