Skip to content

Commit 1eab303

Browse files
committed
mark tests that use estimateMaxPods as serial
1 parent b2933c0 commit 1eab303

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/e2e/apimachinery/garbage_collector.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ import (
5454
// estimateMaximumPods estimates how many pods the cluster can handle
5555
// with some wiggle room, to prevent pods being unable to schedule due
5656
// to max pod constraints.
57+
//
58+
// Tests that call this should use framework.WithSerial() because they're not
59+
// safe to run concurrently as they consume a large number of pods.
5760
func estimateMaximumPods(ctx context.Context, c clientset.Interface, min, max int32) int32 {
5861
nodes, err := e2enode.GetReadySchedulableNodes(ctx, c)
5962
framework.ExpectNoError(err)
@@ -382,7 +385,7 @@ var _ = SIGDescribe("Garbage collector", func() {
382385
Testname: Garbage Collector, delete replication controller, propagation policy orphan
383386
Description: Create a replication controller with maximum allocatable Pods between 10 and 100 replicas. Once RC is created and the all Pods are created, delete RC with deleteOptions.PropagationPolicy set to Orphan. Deleting the Replication Controller MUST cause pods created by that RC to be orphaned.
384387
*/
385-
framework.ConformanceIt("should orphan pods created by rc if delete options say so", func(ctx context.Context) {
388+
framework.ConformanceIt("should orphan pods created by rc if delete options say so", framework.WithSerial(), func(ctx context.Context) {
386389
clientSet := f.ClientSet
387390
rcClient := clientSet.CoreV1().ReplicationControllers(f.Namespace.Name)
388391
podClient := clientSet.CoreV1().Pods(f.Namespace.Name)
@@ -641,7 +644,7 @@ var _ = SIGDescribe("Garbage collector", func() {
641644
Testname: Garbage Collector, delete replication controller, after owned pods
642645
Description: Create a replication controller with maximum allocatable Pods between 10 and 100 replicas. Once RC is created and the all Pods are created, delete RC with deleteOptions.PropagationPolicy set to Foreground. Deleting the Replication Controller MUST cause pods created by that RC to be deleted before the RC is deleted.
643646
*/
644-
framework.ConformanceIt("should keep the rc around until all its pods are deleted if the deleteOptions says so", func(ctx context.Context) {
647+
framework.ConformanceIt("should keep the rc around until all its pods are deleted if the deleteOptions says so", framework.WithSerial(), func(ctx context.Context) {
645648
clientSet := f.ClientSet
646649
rcClient := clientSet.CoreV1().ReplicationControllers(f.Namespace.Name)
647650
podClient := clientSet.CoreV1().Pods(f.Namespace.Name)
@@ -716,7 +719,7 @@ var _ = SIGDescribe("Garbage collector", func() {
716719
Testname: Garbage Collector, multiple owners
717720
Description: Create a replication controller RC1, with maximum allocatable Pods between 10 and 100 replicas. Create second replication controller RC2 and set RC2 as owner for half of those replicas. Once RC1 is created and the all Pods are created, delete RC1 with deleteOptions.PropagationPolicy set to Foreground. Half of the Pods that has RC2 as owner MUST not be deleted or have a deletion timestamp. Deleting the Replication Controller MUST not delete Pods that are owned by multiple replication controllers.
718721
*/
719-
framework.ConformanceIt("should not delete dependents that have both valid owner and owner that's waiting for dependents to be deleted", func(ctx context.Context) {
722+
framework.ConformanceIt("should not delete dependents that have both valid owner and owner that's waiting for dependents to be deleted", framework.WithSerial(), func(ctx context.Context) {
720723
clientSet := f.ClientSet
721724
rcClient := clientSet.CoreV1().ReplicationControllers(f.Namespace.Name)
722725
podClient := clientSet.CoreV1().Pods(f.Namespace.Name)

0 commit comments

Comments
 (0)