From e2477171ca20be9b1db9039dc0048b3160717a6d Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Wed, 16 Jun 2021 12:52:21 +0200 Subject: [PATCH 1/2] Ensure images are pulled after eviction tests --- test/e2e_node/system_node_critical_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/e2e_node/system_node_critical_test.go b/test/e2e_node/system_node_critical_test.go index 0c5b21e5d74..fcecccaf28f 100644 --- a/test/e2e_node/system_node_critical_test.go +++ b/test/e2e_node/system_node_critical_test.go @@ -38,6 +38,14 @@ var _ = SIGDescribe("SystemNodeCriticalPod [Slow] [Serial] [Disruptive] [NodeFea // this test only manipulates pods in kube-system f.SkipNamespaceCreation = true + ginkgo.AfterEach(func() { + if framework.TestContext.PrepullImages { + // The test may cause the prepulled images to be evicted, + // prepull those images again to ensure this test not affect following tests. + PrePullAllImages() + } + }) + ginkgo.Context("when create a system-node-critical pod", func() { tempSetCurrentKubeletConfig(f, func(initialConfig *kubeletconfig.KubeletConfiguration) { diskConsumed := resource.MustParse("200Mi") From 0839c00b76b7888fa152a0fed8ace6e0317f00c6 Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Wed, 23 Jun 2021 20:12:46 +0200 Subject: [PATCH 2/2] Increase pressure timout on DiskPressure test --- test/e2e_node/eviction_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e_node/eviction_test.go b/test/e2e_node/eviction_test.go index a190f737e72..b78a5411ea8 100644 --- a/test/e2e_node/eviction_test.go +++ b/test/e2e_node/eviction_test.go @@ -51,7 +51,7 @@ import ( const ( postTestConditionMonitoringPeriod = 1 * time.Minute evictionPollInterval = 2 * time.Second - pressureDisappearTimeout = 1 * time.Minute + pressureDisappearTimeout = 10 * time.Minute // pressure conditions often surface after evictions because the kubelet only updates // node conditions periodically. // we wait this period after evictions to make sure that we wait out this delay