(self)
| 3542 | @warnings_helper.ignore_fork_in_thread_deprecation_warnings() |
| 3543 | @support.skip_if_sanitizer('TSan: leaks threads', thread=True) |
| 3544 | def test_remote(self): |
| 3545 | authkey = os.urandom(32) |
| 3546 | |
| 3547 | manager = QueueManager( |
| 3548 | address=(socket_helper.HOST, 0), authkey=authkey, serializer=SERIALIZER, |
| 3549 | shutdown_timeout=SHUTDOWN_TIMEOUT) |
| 3550 | manager.start() |
| 3551 | self.addCleanup(manager.shutdown) |
| 3552 | |
| 3553 | p = self.Process(target=self._putter, args=(manager.address, authkey)) |
| 3554 | p.daemon = True |
| 3555 | p.start() |
| 3556 | |
| 3557 | manager2 = QueueManager2( |
| 3558 | address=manager.address, authkey=authkey, serializer=SERIALIZER, |
| 3559 | shutdown_timeout=SHUTDOWN_TIMEOUT) |
| 3560 | manager2.connect() |
| 3561 | queue = manager2.get_queue() |
| 3562 | |
| 3563 | self.assertEqual(queue.get(), self.result) |
| 3564 | |
| 3565 | # Because we are using xmlrpclib for serialization instead of |
| 3566 | # pickle this will cause a serialization error. |
| 3567 | self.assertRaises(Exception, queue.put, time.sleep) |
| 3568 | |
| 3569 | # Make queue finalizer run before the server is stopped |
| 3570 | del queue |
| 3571 | |
| 3572 | |
| 3573 | @hashlib_helper.requires_hashdigest('sha256') |
nothing calls this directly
no test coverage detected