Skip to content

Commit 2d4bd0f

Browse files
authored
Fix reloader test flakiness (#141)
This `sleep 1` was added in 2df91f6 to address CI failures, however this has not appeared to fix the issues. When investigating how the FileUpdateChecker tests worked in Rails, I realized that the sleep is actually on the other side of the touch. Its purpose is to ensure that there is separation between the create and update times of the files (so that the reloader can identify the change), so it should go before the touch.
1 parent 5850178 commit 2d4bd0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/reloader_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ReloaderTest < ActiveSupport::TestCase
2424

2525
private
2626
def touch_config
27-
FileUtils.touch(@config)
2827
sleep 1
28+
FileUtils.touch(@config)
2929
end
3030
end

0 commit comments

Comments
 (0)