Skip to content

Commit

Permalink
Replace deprecated --slow-spec-threshold Ginkgo flag with `--poll-p…
Browse files Browse the repository at this point in the history
…rogress-after` (#6834)

* Replace deprecated '--slow-spec-threshold' Ginkgo flag with '--poll-progress-after'

Per [1], this instructs Ginkgo to automatically emit a progress report
whenever a node takes too long to complete.
The Progress Report includes information about which node is currently running
and the exact line of code that it is currently executing,
along with any relevant goroutines that were launched by the spec.

[1] https://onsi.github.io/ginkgo/#getting-visibility-into-long-running-specs

* Also set '--poll-progress-interval' flag so as to get progress reports periodically
  • Loading branch information
rm3l authored May 23, 2023
1 parent db35b57 commit 58969d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ else
TEST_EXEC_NODES := 4
endif

# Slow spec threshold for ginkgo tests. After this time (in second), ginkgo marks test as slow
SLOW_SPEC_THRESHOLD := 120s
# After this time, Ginkgo will emit progress reports, so we can get visibility into long-running tests.
POLL_PROGRESS_INTERVAL := 120s

# Env variable GINKGO_TEST_ARGS is used to get control over enabling ginkgo test flags against each test target run.
# For example:
Expand All @@ -53,7 +53,7 @@ else
PODMAN_EXEC_NODES := 1
endif

GINKGO_FLAGS_ALL = $(GINKGO_TEST_ARGS) --randomize-all --slow-spec-threshold=$(SLOW_SPEC_THRESHOLD) -timeout $(TIMEOUT) --no-color
GINKGO_FLAGS_ALL = $(GINKGO_TEST_ARGS) --randomize-all --poll-progress-after=$(POLL_PROGRESS_INTERVAL) --poll-progress-interval=$(POLL_PROGRESS_INTERVAL) -timeout $(TIMEOUT) --no-color

# Flags to run one test per core.
GINKGO_FLAGS_AUTO = $(GINKGO_FLAGS_ALL) -p
Expand Down

0 comments on commit 58969d9

Please sign in to comment.