Skip to content

Commit 95ddc02

Browse files
committed
Make DisruptionController eviction tests serial to avoid flakes
1 parent a71586f commit 95ddc02

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
@@ -148,7 +148,14 @@ var _ = SIGDescribe("DisruptionController", func() {
148148
if c.shouldDeny {
149149
expectation = "should not allow an eviction"
150150
}
151-
ginkgo.It(fmt.Sprintf("evictions: %s => %s", c.description, expectation), func() {
151+
// tests with exclusive set to true relies on HostPort to make sure
152+
// only one pod from the replicaset is assigned to each node. This
153+
// requires these tests to be run serially.
154+
var serial string
155+
if c.exclusive {
156+
serial = " [Serial]"
157+
}
158+
ginkgo.It(fmt.Sprintf("evictions: %s => %s%s", c.description, expectation, serial), func() {
152159
if c.skipForBigClusters {
153160
e2eskipper.SkipUnlessNodeCountIsAtMost(bigClusterSize - 1)
154161
}

0 commit comments

Comments
 (0)