From 5d7ea98c3f45c3b242d48adb0db570c4947c7d8f Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Fri, 21 Aug 2020 11:44:32 +0900 Subject: [PATCH] Tweak an error message I have encountered the following error message in real world application development. ```console RuntimeError: Runtime log file 'tmp/parallel_runtime_rspec.log' does not contain sufficient data to sort 578 test files, please update it. ``` I think that removing a runtime log file may be a faster solution. This PR adds a hint to options users should choose. --- lib/parallel_tests/test/runner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parallel_tests/test/runner.rb b/lib/parallel_tests/test/runner.rb index 55e48faf..fac95675 100644 --- a/lib/parallel_tests/test/runner.rb +++ b/lib/parallel_tests/test/runner.rb @@ -173,7 +173,7 @@ def sort_by_runtime(tests, runtimes, options={}) allowed_missing -= 1 unless time = runtimes[test] if allowed_missing < 0 log = options[:runtime_log] || runtime_log - raise "Runtime log file '#{log}' does not contain sufficient data to sort #{tests.size} test files, please update it." + raise "Runtime log file '#{log}' does not contain sufficient data to sort #{tests.size} test files, please update or remove it." end [test, time] end