From fe828ef9937e40b5261d19bb2aed4cf92843f5fa Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 18:29:44 +0100 Subject: [PATCH] tests: fix flaky tests (cherry-pick #7676) (#7939) tests: fix flaky tests (#7676) * tests: fix flaky tests * make test-from-stable use actual latest version * fix checkout * remove hardcoded seed * ignore tests for now i guess idk --------- Signed-off-by: Jens Langhammer Co-authored-by: Jens L --- pyproject.toml | 2 +- tests/e2e/test_provider_oauth2_github.py | 4 ++-- tests/e2e/test_provider_oauth2_grafana.py | 4 ++-- tests/e2e/test_source_oauth.py | 4 ++-- tests/e2e/test_source_saml.py | 4 ++-- tests/integration/test_outpost_docker.py | 4 ++-- tests/integration/test_proxy_docker.py | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3022e383a..c4ae98688 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,7 +97,7 @@ const-rgx = "[a-zA-Z0-9_]{1,40}$" ignored-modules = ["binascii", "socket", "zlib"] generated-members = ["xmlsec.constants.*", "xmlsec.tree.*", "xmlsec.template.*"] -ignore = "migrations" +ignore = ["migrations", "tests"] max-attributes = 12 max-branches = 20 diff --git a/tests/e2e/test_provider_oauth2_github.py b/tests/e2e/test_provider_oauth2_github.py index 49f640093..7df12137b 100644 --- a/tests/e2e/test_provider_oauth2_github.py +++ b/tests/e2e/test_provider_oauth2_github.py @@ -36,8 +36,8 @@ class TestProviderOAuth2Github(SeleniumTestCase): "auto_remove": True, "healthcheck": Healthcheck( test=["CMD", "wget", "--spider", "http://localhost:3000"], - interval=5 * 100 * 1000000, - start_period=1 * 100 * 1000000, + interval=5 * 1_000 * 1_000_000, + start_period=1 * 1_000 * 1_000_000, ), "environment": { "GF_AUTH_GITHUB_ENABLED": "true", diff --git a/tests/e2e/test_provider_oauth2_grafana.py b/tests/e2e/test_provider_oauth2_grafana.py index d096a3483..fdb75e1b9 100644 --- a/tests/e2e/test_provider_oauth2_grafana.py +++ b/tests/e2e/test_provider_oauth2_grafana.py @@ -42,8 +42,8 @@ class TestProviderOAuth2OAuth(SeleniumTestCase): "auto_remove": True, "healthcheck": Healthcheck( test=["CMD", "wget", "--spider", "http://localhost:3000"], - interval=5 * 100 * 1000000, - start_period=1 * 100 * 1000000, + interval=5 * 1_000 * 1_000_000, + start_period=1 * 1_000 * 1_000_000, ), "environment": { "GF_AUTH_GENERIC_OAUTH_ENABLED": "true", diff --git a/tests/e2e/test_source_oauth.py b/tests/e2e/test_source_oauth.py index 40f7e1ce7..c7f0fd881 100644 --- a/tests/e2e/test_source_oauth.py +++ b/tests/e2e/test_source_oauth.py @@ -113,8 +113,8 @@ class TestSourceOAuth2(SeleniumTestCase): "command": "dex serve /config.yml", "healthcheck": Healthcheck( test=["CMD", "wget", "--spider", "http://localhost:5556/dex/healthz"], - interval=5 * 100 * 1000000, - start_period=1 * 100 * 1000000, + interval=5 * 1_000 * 1_000_000, + start_period=1 * 1_000 * 1_000_000, ), "volumes": {str(Path(CONFIG_PATH).absolute()): {"bind": "/config.yml", "mode": "ro"}}, } diff --git a/tests/e2e/test_source_saml.py b/tests/e2e/test_source_saml.py index 2d5a7efa9..0921335b7 100644 --- a/tests/e2e/test_source_saml.py +++ b/tests/e2e/test_source_saml.py @@ -83,8 +83,8 @@ class TestSourceSAML(SeleniumTestCase): "auto_remove": True, "healthcheck": Healthcheck( test=["CMD", "curl", "http://localhost:8080"], - interval=5 * 100 * 1000000, - start_period=1 * 100 * 1000000, + interval=5 * 1_000 * 1_000_000, + start_period=1 * 1_000 * 1_000_000, ), "environment": { "SIMPLESAMLPHP_SP_ENTITY_ID": "entity-id", diff --git a/tests/integration/test_outpost_docker.py b/tests/integration/test_outpost_docker.py index 4e12cbbca..028f584a7 100644 --- a/tests/integration/test_outpost_docker.py +++ b/tests/integration/test_outpost_docker.py @@ -34,8 +34,8 @@ class OutpostDockerTests(DockerTestCase, ChannelsLiveServerTestCase): privileged=True, healthcheck=Healthcheck( test=["CMD", "docker", "info"], - interval=5 * 100 * 1000000, - start_period=5 * 100 * 1000000, + interval=5 * 1_000 * 1_000_000, + start_period=5 * 1_000 * 1_000_000, ), environment={"DOCKER_TLS_CERTDIR": "/ssl"}, volumes={ diff --git a/tests/integration/test_proxy_docker.py b/tests/integration/test_proxy_docker.py index 8cbeb0bdd..e63469f81 100644 --- a/tests/integration/test_proxy_docker.py +++ b/tests/integration/test_proxy_docker.py @@ -34,8 +34,8 @@ class TestProxyDocker(DockerTestCase, ChannelsLiveServerTestCase): privileged=True, healthcheck=Healthcheck( test=["CMD", "docker", "info"], - interval=5 * 100 * 1000000, - start_period=5 * 100 * 1000000, + interval=5 * 1_000 * 1_000_000, + start_period=5 * 1_000 * 1_000_000, ), environment={"DOCKER_TLS_CERTDIR": "/ssl"}, volumes={