|
20 | 20 |
|
21 | 21 | import pytest |
22 | 22 |
|
23 | | -from acktest.k8s import resource as k8s |
| 23 | +from acktest.k8s import resource as k8s, condition |
24 | 24 | from acktest.resources import random_suffix_name |
25 | 25 | from e2e import CRD_VERSION, service_marker, CRD_GROUP, load_eks_resource |
26 | 26 | from e2e.replacement_values import REPLACEMENT_VALUES |
|
40 | 40 | CREATE_WAIT_AFTER_SECONDS = 10 |
41 | 41 |
|
42 | 42 | # Time to wait after modifying the CR for the status to change |
43 | | -MODIFY_WAIT_AFTER_SECONDS = 5 |
| 43 | +MODIFY_WAIT_AFTER_SECONDS = 10 |
44 | 44 |
|
45 | 45 | # Time to wait after the nodegroup has changed status, for the CR to update |
46 | 46 | CHECK_STATUS_WAIT_SECONDS = 10 |
@@ -139,7 +139,7 @@ def test_create_update_delete_nodegroup(self, simple_nodegroup, eks_client): |
139 | 139 | wait_for_nodegroup_active(eks_client, cluster_name, nodegroup_name) |
140 | 140 |
|
141 | 141 | # Ensure status is updated properly once it has become active |
142 | | - time.sleep(CHECK_STATUS_WAIT_SECONDS) |
| 142 | + k8s.wait_on_condition(ref, condition.CONDITION_TYPE_RESOURCE_SYNCED, "True", wait_periods=5, period_length=CHECK_STATUS_WAIT_SECONDS) |
143 | 143 | get_and_assert_status(ref, 'ACTIVE', True) |
144 | 144 |
|
145 | 145 | aws_res = eks_client.describe_nodegroup( |
@@ -370,7 +370,7 @@ def test_update_nodegroup_version(self, simple_nodegroup, eks_client): |
370 | 370 | wait_for_nodegroup_active(eks_client, cluster_name, nodegroup_name) |
371 | 371 |
|
372 | 372 | # Ensure status is updated properly once it has become active |
373 | | - time.sleep(CHECK_STATUS_WAIT_SECONDS) |
| 373 | + k8s.wait_on_condition(ref, condition.CONDITION_TYPE_RESOURCE_SYNCED, "True", wait_periods=5, period_length=CHECK_STATUS_WAIT_SECONDS) |
374 | 374 | get_and_assert_status(ref, 'ACTIVE', True) |
375 | 375 |
|
376 | 376 | aws_res = eks_client.describe_nodegroup( |
|
0 commit comments