Skip to content

Commit

Permalink
make it possible to mark tests as flaky and exclude them from normal …
Browse files Browse the repository at this point in the history
…runs
  • Loading branch information
deads2k committed Dec 11, 2024
1 parent 3310db1 commit 94c6286
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/testsuites/flaky.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package testsuites

// This file is not yet updated from an official query
var (
flakyTestNames = map[string]struct{}{
//`[sig-network][OCPFeatureGate:NetworkSegmentation][Feature:UserDefinedPrimaryNetworks] when using openshift ovn-kubernetes created using NetworkAttachmentDefinitions isolates overlapping CIDRs with L3 primary UDN [Suite:openshift/conformance/parallel]`: {},
}
)
19 changes: 19 additions & 0 deletions pkg/testsuites/standard_suites.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ var staticSuites = []ginkgo.TestSuite{
Only the portion of the openshift/conformance test suite that run in parallel.
`),
Matches: func(name string) bool {
_, isFlaky := flakyTestNames[name]
if isFlaky {
return false
}
if isDisabled(name) {
return false
}
Expand All @@ -56,6 +60,21 @@ var staticSuites = []ginkgo.TestSuite{
Parallelism: 30,
MaximumAllowedFlakes: 15,
},
{
Name: "openshift/conformance/ocp-flaky",
Description: templates.LongDesc(`
Our flaky tests plus the portion of the openshift/conformance test suite that run in parallel.
`),
// same as Matches from "openshift/conformance/parallel" without the flakyTestName check
Matches: func(name string) bool {
if isDisabled(name) {
return false
}
return strings.Contains(name, "[Suite:openshift/conformance/parallel")
},
Parallelism: 30,
MaximumAllowedFlakes: 0,
},
{
Name: "openshift/conformance/serial",
Description: templates.LongDesc(`
Expand Down

0 comments on commit 94c6286

Please sign in to comment.