Skip to content

Commit

Permalink
Fix test runner --fail-fast test flake
Browse files Browse the repository at this point in the history
Without the sleep, the test has high variability in the amount of test
ran before stopping. With the sleep, the test is pretty stable with
negligeable impact on run time.
  • Loading branch information
JoeDupuis committed May 11, 2024
1 parent be0cb4e commit a63baa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion railties/test/application/test_runner_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,9 @@ def test_verify_fail_fast
assert false
end
10.times do |n|
4.times do |n|
define_method("test_verify_fail_fast_\#{n}") do
sleep 0.1
assert true
end
end
Expand Down

0 comments on commit a63baa5

Please sign in to comment.