Skip to content

Commit

Permalink
Fix rolling updates flaky tests (#105)
Browse files Browse the repository at this point in the history
Recently we added a new feature that allowed cluster rolling updates,
allowing users to request 1.25->1.29 cluster upgrades. The tests of this
feature consisted of creating a 1.27 cluster, patching 1.29 as version
and then testing that the cluster goes from 1.27 to 1.28 then 1.29.
However we realized that sometimes when checking that the cluster is in
1.28, we find that it's actually 1.29... meaning that the waiter didn't
get the chance to find the cluster in a an active_state...

This patch reduce the waiter delay to quickly catch the cluster in a
active_state

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
a-hilaly authored Feb 14, 2024
1 parent 59a0ab3 commit 16d681d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/e2e/tests/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
CHECK_STATUS_WAIT_SECONDS = 30

def wait_for_cluster_active(eks_client, cluster_name):
waiter = eks_client.get_waiter('cluster_active')
waiter = eks_client.get_waiter(
'cluster_active',
)
waiter.config.delay = 5
waiter.config.max_attempts = 240
waiter.wait(name=cluster_name)

def get_and_assert_status(ref: k8s.CustomResourceReference, expected_status: str, expected_synced: bool):
Expand Down

0 comments on commit 16d681d

Please sign in to comment.