Skip to content

Commit 7de7191

Browse files
committed
OCPBUGS-59139: Increase assertExpectedDNSRecords timeout to 2 minutes
This PR addresses OCPBUGS-59139. https://issues.redhat.com//browse/OCPBUGS-59139 Increase the timeout value for the assertExpectedDNSRecords test/e2e/util_gatewayapi_test function to 2 minutes to give the DNSRecords more time to be cleaned up in the e2e test cases that check for the record deletion. This is to avoid CI flakes. Also increase the polling interval from 1s to 5s to avoid unnecessary polls and reduce the noise in the logs. Modify the assertExpectedDNSRecords function to not error out on listing the DNSRecords when there is an external issue and retry the request instead.
1 parent 52a0048 commit 7de7191

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/e2e/util_gatewayapi_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,14 +732,15 @@ func assertExpectedDNSRecords(t *testing.T, expectations map[expectedDnsRecord]b
732732

733733
var expectationsMet bool
734734

735-
err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 1*time.Minute, false, func(context context.Context) (bool, error) {
735+
err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 2*time.Minute, false, func(context context.Context) (bool, error) {
736736
haveExpectNotPresent := false
737737
// expectationsMet starts true and gets set to false when some expectation is not met.
738738
expectationsMet = true
739739

740740
dnsRecords := &v1.DNSRecordList{}
741741
if err := kclient.List(context, dnsRecords, client.InNamespace(operatorcontroller.DefaultOperandNamespace)); err != nil {
742-
return false, fmt.Errorf("failed to list DNSRecords: %v", err)
742+
t.Logf("failed to list DNSRecords: %v, retrying...", err)
743+
return false, nil
743744
}
744745

745746
// Iterate over all expectations.

0 commit comments

Comments
 (0)