Merge pull request #95769 from alculquicondor/relax_spreading_e2e

Add more Pods and relax skew in E2E spread test
This commit is contained in:
Kubernetes Prow Robot 2020-10-22 22:17:17 -07:00 committed by GitHub
commit ba8ce9c81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,11 +54,11 @@ var _ = SIGDescribe("Multi-AZ Clusters", func() {
// TODO: SkipUnlessDefaultScheduler() // Non-default schedulers might not spread // TODO: SkipUnlessDefaultScheduler() // Non-default schedulers might not spread
}) })
ginkgo.It("should spread the pods of a service across zones", func() { ginkgo.It("should spread the pods of a service across zones", func() {
SpreadServiceOrFail(f, (2*zoneCount)+1, imageutils.GetPauseImageName()) SpreadServiceOrFail(f, 5*zoneCount, imageutils.GetPauseImageName())
}) })
ginkgo.It("should spread the pods of a replication controller across zones", func() { ginkgo.It("should spread the pods of a replication controller across zones", func() {
SpreadRCOrFail(f, int32((2*zoneCount)+1), framework.ServeHostnameImage, []string{"serve-hostname"}) SpreadRCOrFail(f, int32(5*zoneCount), framework.ServeHostnameImage, []string{"serve-hostname"})
}) })
}) })
@ -171,7 +171,7 @@ func checkZoneSpreading(c clientset.Interface, pods *v1.PodList, zoneNames []str
maxPodsPerZone = podCount maxPodsPerZone = podCount
} }
} }
gomega.Expect(minPodsPerZone).To(gomega.BeNumerically("~", maxPodsPerZone, 1), gomega.Expect(maxPodsPerZone-minPodsPerZone).To(gomega.BeNumerically("~", 0, 2),
"Pods were not evenly spread across zones. %d in one zone and %d in another zone", "Pods were not evenly spread across zones. %d in one zone and %d in another zone",
minPodsPerZone, maxPodsPerZone) minPodsPerZone, maxPodsPerZone)
} }