From 95ddc029fad324de70b3ae5a9cd6a0545d1b6ceb Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Tue, 4 Feb 2020 09:02:33 -0800 Subject: [PATCH] Make DisruptionController eviction tests serial to avoid flakes --- test/e2e/apps/disruption.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/e2e/apps/disruption.go b/test/e2e/apps/disruption.go index 4b4ad4ae983..18950d2d753 100644 --- a/test/e2e/apps/disruption.go +++ b/test/e2e/apps/disruption.go @@ -148,7 +148,14 @@ var _ = SIGDescribe("DisruptionController", func() { if c.shouldDeny { expectation = "should not allow an eviction" } - ginkgo.It(fmt.Sprintf("evictions: %s => %s", c.description, expectation), func() { + // tests with exclusive set to true relies on HostPort to make sure + // only one pod from the replicaset is assigned to each node. This + // requires these tests to be run serially. + var serial string + if c.exclusive { + serial = " [Serial]" + } + ginkgo.It(fmt.Sprintf("evictions: %s => %s%s", c.description, expectation, serial), func() { if c.skipForBigClusters { e2eskipper.SkipUnlessNodeCountIsAtMost(bigClusterSize - 1) }