From db6a5caeb05e8a6dbd1f6dc99fd3ff7bd4970751 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Thu, 20 Jul 2023 19:43:19 +0300 Subject: [PATCH] Increase kubectl_test timeouts We see random timeouts in kubectl_test in github. This was very rare before, but since we added more jobs we see this frequently. Increase the timeout from 10 to 30 seconds to make sure the test pass even if the host is overloaded. Fixes: #997 Signed-off-by: Nir Soffer --- test/drenv/kubectl_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/drenv/kubectl_test.py b/test/drenv/kubectl_test.py index 446f5a3e1..9c85122ed 100644 --- a/test/drenv/kubectl_test.py +++ b/test/drenv/kubectl_test.py @@ -9,6 +9,9 @@ EXAMPLE_DEPLOYMENT = os.path.join("addons", "example", "deployment.yaml") +# Avoid random timeouts in github. +TIMEOUT = 30 + def test_version(tmpenv): out = kubectl.version(output="json", context=tmpenv.profile) @@ -48,7 +51,7 @@ def test_rollout(tmpenv, capsys): kubectl.rollout( "status", "deploy/example-deployment", - "--timeout=10s", + f"--timeout={TIMEOUT}s", context=tmpenv.profile, ) out, err = capsys.readouterr() @@ -59,7 +62,7 @@ def test_wait(tmpenv, capsys): kubectl.wait( "deploy/example-deployment", "--for=condition=available", - "--timeout=10s", + f"--timeout={TIMEOUT}s", context=tmpenv.profile, ) out, err = capsys.readouterr()