sssd/0032-intg-Increase-startup-...

60 lines
2.6 KiB
Diff

From dc5da74112bde32b0bd33d9304f7e94eb8ed2885 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Thu, 17 Aug 2017 06:58:10 +0200
Subject: [PATCH 32/93] intg: Increase startup timeouts for kcm and secrets
In cwrap environment, we start sssd_kcm and sssd_secrets ourself
and not by systemd socket activation. Our approach is to wait a second in
a loop till socket is available. However sometimes 1 second is not enough.
Patch increases wait timeout from 1 second to 10 and it seems to be enough even
when processes were executed with valgrind.
Traceback (most recent call last):
File "src/tests/intg/test_secrets.py", line 419, in setup_for_cli_timeout_test
return create_sssd_secrets_fixture(request)
File "src/tests/intg/test_secrets.py", line 82, in create_sssd_secrets_fixture
assert os.path.exists(sock_path)
AssertionError: assert False
+ where False = <function exists at 0x7f6c1cf520c8>('/tmp/sssd-intg.cdv0namx/var/run/secrets.socket')
+ where <function exists at 0x7f6c1cf520c8> = <module 'posixpath' from '/usr/lib64/python2.7/posixpath.pyc'>.exists
+ where <module 'posixpath' from '/usr/lib64/python2.7/posixpath.pyc'> = os.path
Resolves:
https://pagure.io/SSSD/sssd/issue/3481
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
---
src/tests/intg/test_kcm.py | 2 +-
src/tests/intg/test_secrets.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tests/intg/test_kcm.py b/src/tests/intg/test_kcm.py
index ae49eca808b1b04faf2a9630043f9998816f3efe..72a3458c8c598bae1fe929c062990da0bcbc3063 100644
--- a/src/tests/intg/test_kcm.py
+++ b/src/tests/intg/test_kcm.py
@@ -90,7 +90,7 @@ def create_sssd_kcm_fixture(sock_path, request):
else:
abs_sock_path = os.path.join(config.RUNSTATEDIR, sock_path)
sck = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- for _ in range(1, 10):
+ for _ in range(1, 100):
try:
sck.connect(abs_sock_path)
except:
diff --git a/src/tests/intg/test_secrets.py b/src/tests/intg/test_secrets.py
index a66431ff4e73a6320e134efafcc3817e08f0802d..32ea58ff017f01bc6a28f826d10dabff60761bcb 100644
--- a/src/tests/intg/test_secrets.py
+++ b/src/tests/intg/test_secrets.py
@@ -61,7 +61,7 @@ def create_sssd_secrets_fixture(request):
else:
sock_path = os.path.join(config.RUNSTATEDIR, "secrets.socket")
sck = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- for _ in range(1, 10):
+ for _ in range(1, 100):
try:
sck.connect(sock_path)
except:
--
2.14.1