bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)

test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
(cherry picked from commit 12f74d8608)

Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2018-03-09 10:14:14 -08:00 committed by GitHub
parent 8c163bbf37
commit 3c39beb65d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -1502,6 +1502,7 @@ class EventLoopTestsMixin:
self.assertEqual(5, proto.nbytes) self.assertEqual(5, proto.nbytes)
os.close(slave) os.close(slave)
proto.transport.close()
self.loop.run_until_complete(proto.done) self.loop.run_until_complete(proto.done)
self.assertEqual( self.assertEqual(
['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state) ['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state)

View file

@ -628,6 +628,7 @@ Thomas Heller
Malte Helmert Malte Helmert
Lance Finn Helsten Lance Finn Helsten
Jonathan Hendry Jonathan Hendry
Nathan Henrie
Michael Henry Michael Henry
James Henstridge James Henstridge
Kasun Herath Kasun Herath

View file

@ -0,0 +1,2 @@
Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
``KqueueSelector`` loop was not being closed.