Unverified Kaydet (Commit) bb9474f1 authored tarafından Yury Selivanov's avatar Yury Selivanov Kaydeden (comit) GitHub

Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)

This reverts commit ad74d505.

Turns out it's not a good fix -- Travis has just crashed on this test.
üst ad74d505
...@@ -218,10 +218,8 @@ class SubprocessMixin: ...@@ -218,10 +218,8 @@ class SubprocessMixin:
# the program ends before the stdin can be feeded # the program ends before the stdin can be feeded
create = asyncio.create_subprocess_exec( create = asyncio.create_subprocess_exec(
sys.executable, sys.executable, '-c', 'pass',
'-c', 'print("hello", flush=True)',
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
loop=self.loop) loop=self.loop)
proc = self.loop.run_until_complete(create) proc = self.loop.run_until_complete(create)
return (proc, large_data) return (proc, large_data)
...@@ -230,7 +228,7 @@ class SubprocessMixin: ...@@ -230,7 +228,7 @@ class SubprocessMixin:
proc, large_data = self.prepare_broken_pipe_test() proc, large_data = self.prepare_broken_pipe_test()
async def write_stdin(proc, data): async def write_stdin(proc, data):
await proc.stdout.readline() await asyncio.sleep(0.5, loop=self.loop)
proc.stdin.write(data) proc.stdin.write(data)
await proc.stdin.drain() await proc.stdin.drain()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment