mirror of
https://github.com/python/cpython.git
synced 2025-08-15 14:20:55 +00:00
Merge 70717 to 26maint
This commit is contained in:
parent
e6bab480ac
commit
b48cfa679e
3 changed files with 32 additions and 0 deletions
|
@ -1188,6 +1188,30 @@ class _TestRemoteManager(BaseTestCase):
|
|||
del queue
|
||||
manager.shutdown()
|
||||
|
||||
class _TestManagerRestart(BaseTestCase):
|
||||
|
||||
def _putter(self, address, authkey):
|
||||
manager = QueueManager(
|
||||
address=address, authkey=authkey, serializer=SERIALIZER)
|
||||
manager.connect()
|
||||
queue = manager.get_queue()
|
||||
queue.put('hello world')
|
||||
|
||||
def test_rapid_restart(self):
|
||||
authkey = os.urandom(32)
|
||||
manager = QueueManager(
|
||||
address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
|
||||
manager.start()
|
||||
|
||||
p = self.Process(target=self._putter, args=(manager.address, authkey))
|
||||
p.start()
|
||||
queue = manager.get_queue()
|
||||
self.assertEqual(queue.get(), 'hello world')
|
||||
manager.shutdown()
|
||||
manager = QueueManager(
|
||||
address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
|
||||
manager.start()
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue