From 9730cb438d3ab412287829d421a7b8b87caa85a3 Mon Sep 17 00:00:00 2001 From: roywang Date: Thu, 24 Dec 2020 18:22:27 +0900 Subject: [PATCH] fix unstable integration test Signed-off-by: roywang --- test/integration/appconfig_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/integration/appconfig_test.go b/test/integration/appconfig_test.go index d7f9c99f0..3b21ebb7e 100644 --- a/test/integration/appconfig_test.go +++ b/test/integration/appconfig_test.go @@ -159,7 +159,13 @@ func TestAppConfigController(t *testing.T) { }, })) - if err := c.Create(context.Background(), ac); err != nil { + if err := waitFor(context.Background(), 3*time.Second, func() (bool, error) { + // re-try because validating-webhook may fail for workloadDefinition is not found + if err := c.Create(context.Background(), ac); err != nil { + return false, err + } + return true, nil + }); err != nil { return err }