Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
stephsachrajda committed Oct 18, 2023
1 parent c7ece4b commit 51e0113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ruby/lib/minitest/queue/build_status_recorder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ def record(test)
elsif test.skipped?
self.skips += 1
elsif test.error?
puts "--- increment error"
self.errors += 1
elsif test.failure
puts "--- increment failure"
self.failures += 1
end

stats = COUNTERS.zip(COUNTERS.map { |c| send(c) }).to_h
if (test.failure || test.error?) && !test.skipped?
puts "--- recording error"
build.record_error("#{test.klass}##{test.name}", dump(test), stats: stats)
else
build.record_success("#{test.klass}##{test.name}", stats: stats, skip_flaky_record: test.skipped?)
Expand Down
4 changes: 3 additions & 1 deletion ruby/lib/minitest/queue/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ def report_command
puts failures
puts "----"
File.write(queue_config.failure_file, failures)

reporter.report
end

puts('Encountered too many failed tests. Test run was ended early.')
abort!(msg)
# abort!(msg)
else
abort!(msg)
end
Expand Down

0 comments on commit 51e0113

Please sign in to comment.