(self)
| 3510 | self.assertTrue(self.misc_event.wait(timeout=self.fail_timeout)) |
| 3511 | |
| 3512 | def _testSendmsgTimeout(self): |
| 3513 | try: |
| 3514 | self.cli_sock.settimeout(0.03) |
| 3515 | try: |
| 3516 | while True: |
| 3517 | self.sendmsgToServer([b"a"*512]) |
| 3518 | except TimeoutError: |
| 3519 | pass |
| 3520 | except OSError as exc: |
| 3521 | if exc.errno != errno.ENOMEM: |
| 3522 | raise |
| 3523 | # bpo-33937 the test randomly fails on Travis CI with |
| 3524 | # "OSError: [Errno 12] Cannot allocate memory" |
| 3525 | else: |
| 3526 | self.fail("TimeoutError not raised") |
| 3527 | finally: |
| 3528 | self.misc_event.set() |
| 3529 | |
| 3530 | # XXX: would be nice to have more tests for sendmsg flags argument. |
| 3531 |
nothing calls this directly
no test coverage detected