From 012e848c8c7955dde2bebbfe50cb2e68610b77a2 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Mon, 9 Oct 2023 15:18:20 +0200 Subject: [PATCH] test: sleep after cleanup Signed-off-by: Matej Vasek --- test/oncluster/scenario_runtime_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/oncluster/scenario_runtime_test.go b/test/oncluster/scenario_runtime_test.go index da270add48..0a9fce955e 100644 --- a/test/oncluster/scenario_runtime_test.go +++ b/test/oncluster/scenario_runtime_test.go @@ -8,6 +8,7 @@ import ( "path/filepath" "strings" "testing" + "time" "k8s.io/apimachinery/pkg/util/rand" common "knative.dev/func/test/common" @@ -79,7 +80,10 @@ func runtimeImpl(t *testing.T, lang string, builder string) { "--builder", builder, "--git-url", remoteRepo.ClusterCloneURL) - defer knFunc.Exec("delete", "-p", funcPath) + t.Cleanup(func() { + knFunc.Exec("delete", "-p", funcPath) + time.Sleep(time.Second * 10) + }) // -- Assertions -- result := knFunc.Exec("invoke", "-p", funcPath)