diff options
| author | Barry Warsaw | 2015-12-29 17:23:54 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-12-29 17:23:54 -0500 |
| commit | 1602cecded07961585838a31758147e76584e957 (patch) | |
| tree | 4e55d423f88424edabfc52eaa8c17357d57b296e /src/mailman/bin/tests/test_master.py | |
| parent | 39fd2905cc34221ca2907f14f3f018190a3f62c5 (diff) | |
| download | mailman-1602cecded07961585838a31758147e76584e957.tar.gz mailman-1602cecded07961585838a31758147e76584e957.tar.zst mailman-1602cecded07961585838a31758147e76584e957.zip | |
Diffstat (limited to 'src/mailman/bin/tests/test_master.py')
| -rw-r--r-- | src/mailman/bin/tests/test_master.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/bin/tests/test_master.py b/src/mailman/bin/tests/test_master.py index 371f48502..d0c3279ac 100644 --- a/src/mailman/bin/tests/test_master.py +++ b/src/mailman/bin/tests/test_master.py @@ -27,6 +27,7 @@ import errno import tempfile import unittest +from datetime import timedelta from flufl.lock import Lock from mailman.bin import master @@ -60,8 +61,8 @@ class TestMasterLock(unittest.TestCase): state, lock = master.master_state(self.lock_file) self.assertEqual(state, master.WatcherState.none) # Acquire the lock as if another process had already started the - # master. - my_lock.lock() + # master. Use a timeout to avoid this test deadlocking. + my_lock.lock(timedelta(seconds=60)) try: state, lock = master.master_state(self.lock_file) finally: |
