Unverified Kaydet (Commit) 8534d533 authored tarafından Ned Deily's avatar Ned Deily Kaydeden (comit) GitHub

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

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 12f74d86)
Co-authored-by: 's avatarNathan Henrie <n8henrie@users.noreply.github.com>

Also, re-enable test_read_pty_output on macOS.
üst 30e507df
...@@ -1475,7 +1475,6 @@ class EventLoopTestsMixin: ...@@ -1475,7 +1475,6 @@ class EventLoopTestsMixin:
@unittest.skipUnless(sys.platform != 'win32', @unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows") "Don't support pipes for Windows")
@unittest.skipIf(sys.platform == 'darwin', 'test hangs on MacOS')
def test_read_pty_output(self): def test_read_pty_output(self):
proto = MyReadPipeProto(loop=self.loop) proto = MyReadPipeProto(loop=self.loop)
...@@ -1502,6 +1501,7 @@ class EventLoopTestsMixin: ...@@ -1502,6 +1501,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)
......
...@@ -631,6 +631,7 @@ Thomas Heller ...@@ -631,6 +631,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
......
Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
``KqueueSelector`` loop was not being closed.
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