Skip to content

Commit a63baa5

Browse files
committed
Fix test runner --fail-fast test flake
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.
1 parent be0cb4e commit a63baa5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

railties/test/application/test_runner_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,9 @@ def test_verify_fail_fast
782782
assert false
783783
end
784784
785-
10.times do |n|
785+
4.times do |n|
786786
define_method("test_verify_fail_fast_\#{n}") do
787+
sleep 0.1
787788
assert true
788789
end
789790
end

0 commit comments

Comments
 (0)