Skip to content

Commit 24314d2

Browse files
committed
fix flaky test
1 parent c30f448 commit 24314d2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/e2e/apimachinery/resource_quota.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,17 @@ var _ = SIGDescribe("ResourceQuota", func() {
391391
framework.ExpectNoError(err)
392392

393393
ginkgo.By("Deleting a ReplicationController")
394-
err = f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Delete(replicationController.Name, nil)
394+
// Without the delete options, the object isn't actually
395+
// removed until the GC verifies that all children have been
396+
// detached. ReplicationControllers default to "orphan", which
397+
// is different from most resources. (Why? To preserve a common
398+
// workflow from prior to the GC's introduction.)
399+
err = f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Delete(replicationController.Name, &metav1.DeleteOptions{
400+
PropagationPolicy: func() *metav1.DeletionPropagation {
401+
p := metav1.DeletePropagationBackground
402+
return &p
403+
}(),
404+
})
395405
framework.ExpectNoError(err)
396406

397407
ginkgo.By("Ensuring resource quota status released usage")

0 commit comments

Comments
 (0)