@@ -11,6 +11,7 @@ import (
1111
1212 "github.com/openshift/origin/pkg/monitortestlibrary/allowedbackenddisruption"
1313 "github.com/openshift/origin/pkg/monitortestlibrary/platformidentification"
14+ "github.com/openshift/origin/pkg/monitortestlibrary/utility"
1415
1516 "github.com/openshift/origin/pkg/monitor/backenddisruption"
1617 "github.com/openshift/origin/pkg/monitor/monitorapi"
@@ -233,6 +234,33 @@ func historicalAllowedDisruption(ctx context.Context, backend *backenddisruption
233234 return allowedbackenddisruption .GetAllowedDisruption (backend .GetDisruptionBackendName (), * jobType )
234235}
235236
237+ // filterOutKnownDisruptiveTestIntervals removes disruption intervals that overlap with
238+ // known-disruptive serial tests like NoExecuteTaintManager, which applies NoExecute taints
239+ // to worker nodes where its test pods land, potentially evicting pods (including
240+ // metrics-server) and causing expected API unavailability that is not a product bug.
241+ func filterOutKnownDisruptiveTestIntervals (intervals monitorapi.Intervals ) monitorapi.Intervals {
242+ knownDisruptiveTests := intervals .Filter (func (i monitorapi.Interval ) bool {
243+ if i .Source != monitorapi .SourceE2ETest {
244+ return false
245+ }
246+ testName := i .Locator .Keys [monitorapi .LocatorE2ETestKey ]
247+ return strings .Contains (testName , "NoExecuteTaintManager" )
248+ })
249+
250+ if len (knownDisruptiveTests ) == 0 {
251+ return intervals
252+ }
253+
254+ return intervals .Filter (func (i monitorapi.Interval ) bool {
255+ for _ , disruptiveTest := range knownDisruptiveTests {
256+ if utility .IntervalsOverlap (i , disruptiveTest ) && monitorapi .IsErrorEvent (i ) {
257+ return false
258+ }
259+ }
260+ return true
261+ })
262+ }
263+
236264func (w * Availability ) EvaluateTestsFromConstructedIntervals (ctx context.Context , finalIntervals monitorapi.Intervals ) ([]* junitapi.JUnitTestCase , error ) {
237265 if w == nil {
238266 return nil , fmt .Errorf ("unable to evaluate tests because instance is nil" )
@@ -244,12 +272,15 @@ func (w *Availability) EvaluateTestsFromConstructedIntervals(ctx context.Context
244272 return nil , err
245273 }
246274
247- newConnectionJunit , err := w .junitForNewConnections (ctx , finalIntervals , jobType )
275+ // Filter out disruption that occurred during known-disruptive serial tests
276+ filteredIntervals := filterOutKnownDisruptiveTestIntervals (finalIntervals )
277+
278+ newConnectionJunit , err := w .junitForNewConnections (ctx , filteredIntervals , jobType )
248279 if err != nil {
249280 return nil , err
250281 }
251282
252- reusedConnectionJunit , err := w .junitForReusedConnections (ctx , finalIntervals , jobType )
283+ reusedConnectionJunit , err := w .junitForReusedConnections (ctx , filteredIntervals , jobType )
253284 if err != nil {
254285 return nil , err
255286 }
0 commit comments