(self)
| 3613 | self.assertTrue(self.misc_event.wait(timeout=self.fail_timeout)) |
| 3614 | |
| 3615 | def _testSendmsgTimeout(self): |
| 3616 | try: |
| 3617 | self.cli_sock.settimeout(0.03) |
| 3618 | try: |
| 3619 | while True: |
| 3620 | self.sendmsgToServer([b"a"*512]) |
| 3621 | except TimeoutError: |
| 3622 | pass |
| 3623 | except OSError as exc: |
| 3624 | if exc.errno != errno.ENOMEM: |
| 3625 | raise |
| 3626 | # bpo-33937 the test randomly fails on Travis CI with |
| 3627 | # "OSError: [Errno 12] Cannot allocate memory" |
| 3628 | else: |
| 3629 | self.fail("TimeoutError not raised") |
| 3630 | finally: |
| 3631 | self.misc_event.set() |
| 3632 | |
| 3633 | # XXX: would be nice to have more tests for sendmsg flags argument. |
| 3634 |
nothing calls this directly
no test coverage detected