From b4dde9167e378a4403101231852641156febe0b0 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 3 Jun 2024 07:56:57 -0400 Subject: [PATCH 1/4] Add env overrides for integration test polling sleep times. No-Issue Signed-off-by: James Tanner --- galaxy_ng/tests/integration/constants.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/galaxy_ng/tests/integration/constants.py b/galaxy_ng/tests/integration/constants.py index b15f17d504..6cd264a7b3 100755 --- a/galaxy_ng/tests/integration/constants.py +++ b/galaxy_ng/tests/integration/constants.py @@ -1,14 +1,20 @@ """Constants usable by multiple test modules.""" +import os + + USERNAME_ADMIN = "ansible-insights" USERNAME_CONSUMER = "autohubtest3" USERNAME_PUBLISHER = "autohubtest2" # time.sleep() seconds for checks that poll in a loop -SLEEP_SECONDS_POLLING = 1 +SLEEP_SECONDS_POLLING = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_POLLING", 1))) # time.sleep() seconds for checks that wait once -SLEEP_SECONDS_ONETIME = 3 +SLEEP_SECONDS_ONETIME = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_ONETIME", 3))) + +# how many times to sleep when polling +POLLING_MAX_ATTEMPTS = init(os.environ.get(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", 10))) DEFAULT_DISTROS = { 'community': {'basepath': 'community'}, From 243766bdfd9d13398a13e336377de5c47f47ecb1 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 3 Jun 2024 08:03:20 -0400 Subject: [PATCH 2/4] Typo. No-Issue Signed-off-by: James Tanner --- galaxy_ng/tests/integration/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy_ng/tests/integration/constants.py b/galaxy_ng/tests/integration/constants.py index 6cd264a7b3..e7c4f2c9e0 100755 --- a/galaxy_ng/tests/integration/constants.py +++ b/galaxy_ng/tests/integration/constants.py @@ -14,7 +14,7 @@ SLEEP_SECONDS_ONETIME = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_ONETIME", 3))) # how many times to sleep when polling -POLLING_MAX_ATTEMPTS = init(os.environ.get(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", 10))) +POLLING_MAX_ATTEMPTS = int(os.environ.get(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", 10))) DEFAULT_DISTROS = { 'community': {'basepath': 'community'}, From a1f89881e3dab20c4fdeb479c18b11dd953f9042 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 3 Jun 2024 08:14:34 -0400 Subject: [PATCH 3/4] Use string. No-Issue Signed-off-by: James Tanner --- galaxy_ng/tests/integration/constants.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/galaxy_ng/tests/integration/constants.py b/galaxy_ng/tests/integration/constants.py index e7c4f2c9e0..fa2ec4cc3b 100755 --- a/galaxy_ng/tests/integration/constants.py +++ b/galaxy_ng/tests/integration/constants.py @@ -8,13 +8,13 @@ USERNAME_PUBLISHER = "autohubtest2" # time.sleep() seconds for checks that poll in a loop -SLEEP_SECONDS_POLLING = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_POLLING", 1))) +SLEEP_SECONDS_POLLING = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_POLLING", "1"))) # time.sleep() seconds for checks that wait once -SLEEP_SECONDS_ONETIME = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_ONETIME", 3))) +SLEEP_SECONDS_ONETIME = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_ONETIME", "3"))) # how many times to sleep when polling -POLLING_MAX_ATTEMPTS = int(os.environ.get(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", 10))) +POLLING_MAX_ATTEMPTS = int(os.environ.get(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", "10"))) DEFAULT_DISTROS = { 'community': {'basepath': 'community'}, From 1149a078ec08b1a5c58de764b4f8a983152a3060 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Mon, 3 Jun 2024 08:21:35 -0400 Subject: [PATCH 4/4] I need more sleep. No-Issue Signed-off-by: James Tanner --- galaxy_ng/tests/integration/constants.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/galaxy_ng/tests/integration/constants.py b/galaxy_ng/tests/integration/constants.py index fa2ec4cc3b..f6064d6941 100755 --- a/galaxy_ng/tests/integration/constants.py +++ b/galaxy_ng/tests/integration/constants.py @@ -8,13 +8,13 @@ USERNAME_PUBLISHER = "autohubtest2" # time.sleep() seconds for checks that poll in a loop -SLEEP_SECONDS_POLLING = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_POLLING", "1"))) +SLEEP_SECONDS_POLLING = float(os.environ.get("GALAXY_SLEEP_SECONDS_POLLING", "1")) # time.sleep() seconds for checks that wait once -SLEEP_SECONDS_ONETIME = float(os.environ.get(os.environ.get("GALAXY_SLEEP_SECONDS_ONETIME", "3"))) +SLEEP_SECONDS_ONETIME = float(os.environ.get("GALAXY_SLEEP_SECONDS_ONETIME", "3")) # how many times to sleep when polling -POLLING_MAX_ATTEMPTS = int(os.environ.get(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", "10"))) +POLLING_MAX_ATTEMPTS = int(os.environ.get("GALAXY_POLLING_MAX_ATTEMPTS", "10")) DEFAULT_DISTROS = { 'community': {'basepath': 'community'},