From daf90bb7f21d91d6fcb268e81250cf9056020a48 Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Mon, 11 May 2026 14:19:45 -0700 Subject: [PATCH] fix(test): Use wait_on_condition in test_disallow_default_security_group_rule Replace time.sleep(10) with wait_on_condition("ACK.ResourceSynced", "True") so the test waits for the controller to signal reconciliation is complete rather than relying on a fixed delay that may be insufficient under CI load. --- test/e2e/tests/test_vpc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/tests/test_vpc.py b/test/e2e/tests/test_vpc.py index b5d33644..a621ad48 100644 --- a/test/e2e/tests/test_vpc.py +++ b/test/e2e/tests/test_vpc.py @@ -249,7 +249,9 @@ def test_disallow_default_security_group_rule(self, ec2_client, simple_vpc): (ref, cr) = simple_vpc resource_id = cr["status"]["vpcID"] - time.sleep(CREATE_WAIT_AFTER_SECONDS) + # Wait for the controller to finish reconciling (SG rule deletion + # happens inline during creation but the controller may be busy) + assert k8s.wait_on_condition(ref, "ACK.ResourceSynced", "True", wait_periods=5) # Check VPC exists in AWS ec2_validator = EC2Validator(ec2_client)