summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2009-03-30 16:19:10 (GMT)
committerJesse Noller <jnoller@gmail.com>2009-03-30 16:19:10 (GMT)
commitb48cfa679e9ed38973980a35a188117165e7c0c9 (patch)
treea7f56d392be53f6b1a68dceb522f3887a3d28629 /Lib/test
parente6bab480acb17ba62d948f22a29cdd08289e7986 (diff)
downloadcpython-b48cfa679e9ed38973980a35a188117165e7c0c9.zip
cpython-b48cfa679e9ed38973980a35a188117165e7c0c9.tar.gz
cpython-b48cfa679e9ed38973980a35a188117165e7c0c9.tar.bz2
Merge 70717 to 26maint
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_multiprocessing.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index d4ce4fa..aa4743f 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -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()
+
#
#
#