From 49d074f692290a1488c1991ebc66c119468faff3 Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Tue, 17 Jan 2023 15:54:41 +0100 Subject: [PATCH] Work around for https://github.com/kubernetes-sigs/controller-runtime/issues/1571 --- controllers/suite_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 4172f762..9b7081e7 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -149,6 +149,10 @@ var _ = BeforeSuite(func() { var _ = AfterSuite(func() { By("tearing down the test environment") err := testEnv.Stop() + if err != nil { + time.Sleep(4 * time.Second) + } + err = testEnv.Stop() Expect(err).NotTo(HaveOccurred()) })