-
Notifications
You must be signed in to change notification settings - Fork 18.9k
CI: Introduce flaky test finder #38523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,5 +13,6 @@ hack/make.sh \ | |
| binary-daemon \ | ||
| dynbinary \ | ||
| test-docker-py \ | ||
| test-integration-flaky \ | ||
| test-integration \ | ||
| cross | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/usr/bin/env bash | ||
| set -e -o pipefail | ||
|
|
||
| source hack/validate/.validate | ||
| new_tests=$( | ||
| validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' | | ||
| grep -E '^(\+func )(.*)(\*testing)' || true | ||
| ) | ||
|
|
||
| if [ -z "$new_tests" ]; then | ||
| echo 'No new tests added to integration.' | ||
olljanat marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return | ||
| fi | ||
|
|
||
| echo | ||
| echo "Found new integrations tests:" | ||
| echo "$new_tests" | ||
| echo "Running stress test for them." | ||
|
|
||
| ( | ||
| TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|') | ||
| export TESTFLAGS="-test.count 5 -test.run ${TESTARRAY%?}" | ||
| export TEST_REPEAT=5 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @olljanat @thaJeztah why set both
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5 runs is not enough to find example known flaky test TestCreateServiceSecretFileMode. Look comments above when I tested to run this to existing tests. Difference between this and just run 25 times is this will restart daemon after every 5 test runs. Increasing timeout of course can be done if needed. Btw. Did you saw this timeouting on some PR now?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| echo "Using test flags: $TESTFLAGS" | ||
| source hack/make/test-integration | ||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.