From b4e0804764f36f323b01bed5eab2d6046316ca9e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 9 Sep 2022 15:52:31 +0200 Subject: [PATCH] e2e: poll state of test The new support in ginkgo for progress reports while a test runs dumps information about where a test is stuck when it runs too long. This can provide additional insights into what the test is waiting for. For the Kubernetes jobs using ginkgo-e2e.sh, such dumps are now enabled after 300 seconds and then get repeated every 20 seconds. The initial delay is intentionally the same as for warning about a slow test. The rationale is that such test runtimes are unexpected and may need further information to diagnose why they are slow. With -ginkgo.source-root, Ginkgo is able to locate the Kubernetes source code and display small source code snippets for functions that are related to the test, determined through a heuristic that assumes that all files under the test suite are for the tests in it. --- hack/ginkgo-e2e.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 604a10e08d3..6d5f6f928f7 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -198,6 +198,9 @@ fi --dns-domain="${KUBE_DNS_DOMAIN:-cluster.local}" \ --prepull-images="${PREPULL_IMAGES:-false}" \ --ginkgo.slow-spec-threshold="${GINKGO_SLOW_SPEC_THRESHOLD:-300s}" \ + --ginkgo.poll-progress-after="${GINKGO_POLL_PROGRESS_AFTER:-300s}" \ + --ginkgo.poll-progress-interval="${GINKGO_POLL_PROGRESS_INTERVAL:-20s}" \ + --ginkgo.source-root="${KUBE_ROOT}" \ ${MASTER_OS_DISTRIBUTION:+"--master-os-distro=${MASTER_OS_DISTRIBUTION}"} \ ${NODE_OS_DISTRIBUTION:+"--node-os-distro=${NODE_OS_DISTRIBUTION}"} \ ${NUM_NODES:+"--num-nodes=${NUM_NODES}"} \