diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2017-08-17 06:58:10 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-08-18 08:45:39 +0200 |
commit | dc5da74112bde32b0bd33d9304f7e94eb8ed2885 (patch) | |
tree | 22371e36d70865e9f76d99c0f9142cf3e2086fb6 | |
parent | 08cb2a34402d865c3052f80f5be8f9e653c7812f (diff) | |
download | sssd-dc5da74112bde32b0bd33d9304f7e94eb8ed2885.tar.gz sssd-dc5da74112bde32b0bd33d9304f7e94eb8ed2885.tar.xz sssd-dc5da74112bde32b0bd33d9304f7e94eb8ed2885.zip |
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>
-rw-r--r-- | src/tests/intg/test_kcm.py | 2 | ||||
-rw-r--r-- | 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 ae49eca80..72a3458c8 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 a66431ff4..32ea58ff0 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: |