Skip to content

Commit f87f59b

Browse files
Merge pull request #29867 from stbenjam/fix-retry
OCPBUGS-54412: Do not retry extension-sourced tests
2 parents 37bb057 + 00ca1c5 commit f87f59b

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
@@ -509,15 +509,23 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, junitSuiteName string, mon
509509

510510
// Make a copy of the all failing tests (subject to the max allowed flakes) so we can have
511511
// a list of tests to retry.
512+
failedExtensionTestCount := 0
512513
for _, test := range failing {
514+
// Do not retry extension tests -- we also want to remove retries from origin-sourced
515+
// tests, but extensions is where we can start.
516+
if test.binary != nil {
517+
failedExtensionTestCount++
518+
continue
519+
}
520+
513521
retry := test.Retry()
514522
retries = append(retries, retry)
515523
if len(retries) > suite.MaximumAllowedFlakes {
516524
break
517525
}
518526
}
519527

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

522530
// Run the tests in the retries list.
523531
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)