Skip to content

Commit f79610f

Browse files
flavianmissiopenshift-cherrypick-robot
authored andcommitted
wait longer for healthy cluster when testing proxy configuration
the TestOperandProxyConfiguration job has been flakying more and more lately. analysis show that the cause is not the test itself, but cluster recovery after the test teardown runs. it seems some components need longer to recover after a change in proxy configuration. this commit increases the timeout from 5 to 10 minutes in hopes to stabilize this test.
1 parent bc0ee0d commit f79610f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

test/e2e/configuration_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ func TestRouteConfiguration(t *testing.T) {
265265

266266
func TestOperatorProxyConfiguration(t *testing.T) {
267267
te := framework.SetupAvailableImageRegistry(t, nil)
268-
defer framework.TeardownImageRegistry(te)
268+
// this test sometimes fails during tear down because some components
269+
// (unrelated to the image registry) do not recover within the default
270+
// timeout.
271+
defer framework.TeardownImageRegistryWithTimeoutIncrement(te, 5*time.Minute)
269272
defer framework.ResetClusterProxyConfig(te)
270273

271274
// Get the service network to set as NO_PROXY so that the

test/framework/imageregistry.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ func SetupAvailableImageRegistry(t *testing.T, spec *imageregistryapiv1.ImageReg
580580
return te
581581
}
582582

583-
func TeardownImageRegistry(te TestEnv) {
584-
defer WaitUntilClusterOperatorsAreHealthy(te, 10*time.Second, AsyncOperationTimeout)
583+
func TeardownImageRegistryWithTimeoutIncrement(te TestEnv, timeoutIncrement time.Duration) {
584+
defer WaitUntilClusterOperatorsAreHealthy(te, 10*time.Second, AsyncOperationTimeout+timeoutIncrement)
585585
defer CheckAbsenceOfOperatorPods(te)
586586
defer RemoveImageRegistry(te)
587587
defer CheckPodsAreNotRestarted(te, labels.Everything())
@@ -591,3 +591,7 @@ func TeardownImageRegistry(te TestEnv) {
591591
DumpOperatorLogs(context.Background(), te)
592592
}
593593
}
594+
595+
func TeardownImageRegistry(te TestEnv) {
596+
TeardownImageRegistryWithTimeoutIncrement(te, 0)
597+
}

0 commit comments

Comments
 (0)