Skip to content

Commit c9d4257

Browse files
authored
Merge pull request kubernetes#87819 from mortent/SerialFlakyPDBTests
Make DisruptionController eviction tests serial to avoid flakes
2 parents e13463d + 95ddc02 commit c9d4257

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/e2e/apps/disruption.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,14 @@ var _ = SIGDescribe("DisruptionController", func() {
149149
if c.shouldDeny {
150150
expectation = "should not allow an eviction"
151151
}
152-
ginkgo.It(fmt.Sprintf("evictions: %s => %s", c.description, expectation), func() {
152+
// tests with exclusive set to true relies on HostPort to make sure
153+
// only one pod from the replicaset is assigned to each node. This
154+
// requires these tests to be run serially.
155+
var serial string
156+
if c.exclusive {
157+
serial = " [Serial]"
158+
}
159+
ginkgo.It(fmt.Sprintf("evictions: %s => %s%s", c.description, expectation, serial), func() {
153160
if c.skipForBigClusters {
154161
e2eskipper.SkipUnlessNodeCountIsAtMost(bigClusterSize - 1)
155162
}

0 commit comments

Comments
 (0)