This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, m3rc1fulcameron, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-09-17.07:10:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568704233.09.0.97965008425.issue38188@roundup.psfhosted.org>
In-reply-to
Content
Let's make test_fd_transfer_windows a bit less hangy by polling for up to 60 seconds instead of simply trying to recv() and by terminating before trying to join().

    @unittest.skipUnless(HAS_REDUCTION, "test needs multiprocessing.reduction")
    @unittest.skipIf(sys.platform != "win32", "Windows-only test")
    def test_fd_transfer_windows(self):
        if self.TYPE != 'processes':
            self.skipTest("only makes sense with processes")
        conn, child_conn = self.Pipe(duplex=True)
        p = self.Process(target=self._check_handle_access, args=(child_conn,))
        p.daemon = True
        p.start()
        try:
            with open(test.support.TESTFN, "wb") as f:
                self.addCleanup(test.support.unlink, test.support.TESTFN)
                handle = msvcrt.get_osfhandle(f.fileno())
                parent_access = get_handle_info(handle).GrantedAccess
                reduction.send_handle(conn, handle, p.pid)
                if not conn.poll(timeout=60):
                    raise AssertionError("could not receive from child process")
                child_access = conn.recv()
                self.assertEqual(parent_access, child_access)
        finally:
            p.terminate()
            p.join()
History
Date User Action Args
2019-09-17 07:10:33eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, m3rc1fulcameron
2019-09-17 07:10:33eryksunsetmessageid: <1568704233.09.0.97965008425.issue38188@roundup.psfhosted.org>
2019-09-17 07:10:33eryksunlinkissue38188 messages
2019-09-17 07:10:32eryksuncreate