Skip to content

Commit

Permalink
Flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Jan 23, 2025
1 parent 9bce23d commit 085d64f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .aspect/workflows/bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ common:rbe --remote_executor=unix:///mnt/ephemeral/buildbarn/.cache/bb_clientd/g
common:rbe --genrule_strategy=remote,local
common:rbe --jobs=32
common:rbe --remote_timeout=3600

# retry flaky tests
common --flaky_test_attempts=5
9 changes: 9 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ js_library(
":node_modules/typescript-eslint",
],
)

sh_test(
name = "flaky_sh_test",
srcs = ["flake.sh"],
flaky = True,
tags = [
"expected_to_fail",
],
)
11 changes: 11 additions & 0 deletions flake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -o errexit

COUNT=$((RANDOM%3))
echo $COUNT

if [[ "${COUNT}" == "1" ]]; then
exit 0
else
exit 1
fi

0 comments on commit 085d64f

Please sign in to comment.