From 9682ae91b6ff0f28933efabfe299c845e0694b52 Mon Sep 17 00:00:00 2001 From: David Cheung Date: Fri, 27 Oct 2023 22:01:34 +0000 Subject: [PATCH] Additional attempts for check_http_traffic, and update skip test message * Extend check traffic wait time from 60*5s=5min to 180*5=15min since existing tests are failing due to insufficient wait time. * Update skip test message in recipe_test.go. --- test/helper.sh | 4 ++-- test/recipe_test.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/helper.sh b/test/helper.sh index ea1a491b..82f11a20 100644 --- a/test/helper.sh +++ b/test/helper.sh @@ -479,9 +479,9 @@ check_http_status() { eval_cmd="${eval_cmd} -k" fi - # 60*5s=5min + # 180*5s=15min local attempt - for attempt in $(seq 60); do + for attempt in $(seq 180); do local got_code got_code=$(eval ${eval_cmd} || true) if [[ "${got_code}" == "${expect_code}" ]]; then diff --git a/test/recipe_test.go b/test/recipe_test.go index 37b5b231..f943d98a 100644 --- a/test/recipe_test.go +++ b/test/recipe_test.go @@ -62,7 +62,8 @@ func runRecipeTest(t *testing.T, recipeDir string) { for _, file := range []string{"setup.sh", "run-test.sh", "cleanup.sh"} { path := path.Join(recipeDir, file) if _, err := os.Stat(path); err != nil { - t.Skipf("Skipping test %q: stat(%q) = %v", recipeDir, path, err) + t.Logf("stat(%q) = %v", path, err) + t.Skipf("Skipping test %q: %q doesn't exist", recipeDir, path) } paths = append(paths, path) }