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

This reverts commit ad74d50517.

Turns out it's not a good fix -- Travis has just crashed on this test.
This commit is contained in:
Yury Selivanov 2018-05-29 22:00:31 -04:00 committed by GitHub
parent ad74d50517
commit bb9474f1fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -218,10 +218,8 @@ class SubprocessMixin:
# the program ends before the stdin can be feeded
create = asyncio.create_subprocess_exec(
sys.executable,
'-c', 'print("hello", flush=True)',
sys.executable, '-c', 'pass',
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
loop=self.loop)
proc = self.loop.run_until_complete(create)
return (proc, large_data)
@ -230,7 +228,7 @@ class SubprocessMixin:
proc, large_data = self.prepare_broken_pipe_test()
async def write_stdin(proc, data):
await proc.stdout.readline()
await asyncio.sleep(0.5, loop=self.loop)
proc.stdin.write(data)
await proc.stdin.drain()