diff --git a/ruby/lib/ci/queue/redis/build_record.rb b/ruby/lib/ci/queue/redis/build_record.rb index f49b214a..205e98c1 100644 --- a/ruby/lib/ci/queue/redis/build_record.rb +++ b/ruby/lib/ci/queue/redis/build_record.rb @@ -21,6 +21,10 @@ def failed_tests redis.hkeys(key('error-reports')) end + def requeued_tests + redis.hgetall(key('requeues-count')) + end + def pop_warnings warnings = redis.multi do |transaction| transaction.lrange(key('warnings'), 0, -1) diff --git a/ruby/lib/minitest/queue/build_status_reporter.rb b/ruby/lib/minitest/queue/build_status_reporter.rb index 4d1a0874..b54c94cc 100644 --- a/ruby/lib/minitest/queue/build_status_reporter.rb +++ b/ruby/lib/minitest/queue/build_status_reporter.rb @@ -21,11 +21,21 @@ def flaky_reports build.flaky_reports end + def requeued_tests + build.requeued_tests + end + def report puts aggregates errors = error_reports puts errors + requeued_tests.to_a.sort.each do |test_id, count| + puts yellow("REQUEUE") + puts "#{test_id} (requeued #{count} times)" + puts "" + end + errors.empty? end