Skip to content

Commit 085d64f

Browse files
committed
Flaky test
1 parent 9bce23d commit 085d64f

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Diff for: .aspect/workflows/bazelrc

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ common:rbe --remote_executor=unix:///mnt/ephemeral/buildbarn/.cache/bb_clientd/g
99
common:rbe --genrule_strategy=remote,local
1010
common:rbe --jobs=32
1111
common:rbe --remote_timeout=3600
12+
13+
# retry flaky tests
14+
common --flaky_test_attempts=5

Diff for: BUILD.bazel

+9
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@ js_library(
3131
":node_modules/typescript-eslint",
3232
],
3333
)
34+
35+
sh_test(
36+
name = "flaky_sh_test",
37+
srcs = ["flake.sh"],
38+
flaky = True,
39+
tags = [
40+
"expected_to_fail",
41+
],
42+
)

Diff for: flake.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -o errexit
3+
4+
COUNT=$((RANDOM%3))
5+
echo $COUNT
6+
7+
if [[ "${COUNT}" == "1" ]]; then
8+
exit 0
9+
else
10+
exit 1
11+
fi

0 commit comments

Comments
 (0)