Skip to content

Commit 00ca1c5

Browse files
committed
OCPBUGS-54412: Fix retry logic for extension tests
I accidentally broke retries for extension tests, because the pointer to a test binary was omitted. However, because our end goal is that we don't retry at all, and we've existed in this state for months, I'm leaving retries off for externally sourced tests. origin-source tests will continue to retry with the hope we ratchet up test quality to also stop retrying them.
1 parent 2836632 commit 00ca1c5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,23 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, junitSuiteName string, mon
505505

506506
// Make a copy of the all failing tests (subject to the max allowed flakes) so we can have
507507
// a list of tests to retry.
508+
failedExtensionTestCount := 0
508509
for _, test := range failing {
510+
// Do not retry extension tests -- we also want to remove retries from origin-sourced
511+
// tests, but extensions is where we can start.
512+
if test.binary != nil {
513+
failedExtensionTestCount++
514+
continue
515+
}
516+
509517
retry := test.Retry()
510518
retries = append(retries, retry)
511519
if len(retries) > suite.MaximumAllowedFlakes {
512520
break
513521
}
514522
}
515523

516-
logrus.Warningf("Retry count: %d", len(retries))
524+
logrus.Warningf("%d tests failed, %d origin-sourced tests will be retried; %d extension tests will not", len(failing), len(retries), failedExtensionTestCount)
517525

518526
// Run the tests in the retries list.
519527
q := newParallelTestQueue(testRunnerContext)

pkg/test/ginkgo/test_suite.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ func (t *testCase) Retry() *testCase {
121121
copied := &testCase{
122122
name: t.name,
123123
spec: t.spec,
124+
binary: t.binary,
124125
rawName: t.rawName,
125126
binaryName: t.binaryName,
126127
locations: t.locations,
127128
testExclusion: t.testExclusion,
129+
testTimeout: t.testTimeout,
128130

129131
previous: t,
130132
}

0 commit comments

Comments
 (0)