Skip to content

Commit d30b7e1

Browse files
Merge pull request #28590 from danwinship/hostport-21017
OCPBUGS-48445: Ignore an error intentionally generated by a test case
2 parents f0ac431 + 0253b2b commit d30b7e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/monitortests/network/legacynetworkmonitortests/networking.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func testPodSandboxCreation(events monitorapi.Intervals, clientConfig *rest.Conf
6767
{by: " by ovn default network ready", substring: "have you checked that your default network is ready? still waiting for readinessindicatorfile"},
6868
{by: " by adding pod to network", substring: "failed (add)"},
6969
{by: " by initializing docker source", substring: `can't talk to a V1 container registry`},
70+
{by: " by binding hostport", substring: "failed to add hostport"},
7071
{by: " by other", substring: " "}, // always matches
7172
}
7273

@@ -171,6 +172,13 @@ func testPodSandboxCreation(events monitorapi.Intervals, clientConfig *rest.Conf
171172
continue
172173
}
173174
}
175+
if strings.Contains(event.Message.HumanMessage, "cannot open hostport 21017") {
176+
// The "Should recreate evicted statefulset" test intentionally
177+
// causes a hostport conflict and then ensures that it gets
178+
// resolved correctly when the conflict goes away, but in some
179+
// cases, it will transiently hit this error.
180+
continue
181+
}
174182

175183
partialLocator := monitorapi.NonUniquePodLocatorFrom(event.Locator)
176184
if deletionTime := getPodDeletionTime(eventsForPods[partialLocator], event.Locator); deletionTime == nil {

0 commit comments

Comments
 (0)