You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2021/11/07 18:42:46 UTC
[libcloud] 06/14: Use longer timeout to make failure less likely.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 26d27829f5e9d9a62ce1f27aa506375747d921d9
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sat Nov 6 23:59:32 2021 +0100
Use longer timeout to make failure less likely.
---
libcloud/test/storage/test_local.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libcloud/test/storage/test_local.py b/libcloud/test/storage/test_local.py
index 3c579bd..0613f16 100644
--- a/libcloud/test/storage/test_local.py
+++ b/libcloud/test/storage/test_local.py
@@ -76,6 +76,7 @@ class LocalTests(unittest.TestCase):
@unittest.skipIf(platform.system().lower() == 'windows', 'Unsupported on Windows')
def test_lock_local_storage(self):
+ print("aaaa")
# 1. Acquire succeeds
lock = LockLocalStorage("/tmp/a")
with lock:
@@ -90,11 +91,12 @@ class LocalTests(unittest.TestCase):
# 3. Multiprocessing scenario where IPC lock is involved
def acquire_lock_in_subprocess(pid, success):
# For first process acquire should succeed and for the second it should fail
-
- lock = LockLocalStorage("/tmp/c", timeout=0.5)
+ lock = LockLocalStorage("/tmp/c", timeout=1.5)
if pid == 1:
with lock:
+ # We use longer sleep when running tests in parallel to avoid
+ # failures related to slower process spawn
time.sleep(2)
success.value = 1