diff options
author | Koichi Sasada <ko1@atdot.net> | 2022-02-16 17:15:00 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2022-02-16 17:57:04 +0900 |
commit | 00c7a0d491504b0b2b1b8723d4b70e5c24ec649c (patch) | |
tree | 8add7c196429b62a58190cf0369ec3d2556360bf | |
parent | b9851c7e1b1cbc13b050831b0429e7a4097e11b7 (diff) | |
download | ruby-00c7a0d491504b0b2b1b8723d4b70e5c24ec649c.tar.gz |
fix parallel test timeout retrying
On the parallel test, workers can be killed because of timeout
and the information for the retrying can be inconsistent.
This patch will skip if the inconsistency is found and report
as an error.
http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082
-rw-r--r-- | tool/lib/test/unit.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb index f4f44f8010..0c752c0fa7 100644 --- a/tool/lib/test/unit.rb +++ b/tool/lib/test/unit.rb @@ -745,7 +745,19 @@ module Test end unless error.empty? puts "\n""Retrying hung up testcases..." - error.map! {|r| ::Object.const_get(r[:testcase])} + error = error.map do |r| + begin + ::Object.const_get(r[:testcase]) + rescue NameError + # testcase doesn't specify the correct case, so show `r` for information + require 'pp' + + $stderr.puts "Retrying is failed because the file and testcase is not consistent:" + PP.pp r, $stderr + @errors += 1 + nil + end + end.compact verbose = @verbose job_status = options[:job_status] options[:verbose] = @verbose = true |