Skip to content

Commit

Permalink
clean up some of the logs, remove abort
Browse files Browse the repository at this point in the history
  • Loading branch information
stephsachrajda committed Oct 20, 2023
1 parent e4e6a4e commit 5147be5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions ruby/lib/minitest/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,18 +249,15 @@ def run_from_queue(reporter, *)
if failed && CI::Queue.requeueable?(result) && queue.requeue(example)
requeued = true
result.requeue!
puts "---- requeable recording!"
reporter.record(result)
else
ack_result = queue.acknowledge(example)
puts "no ack" unless ack_result
if ack_result
# If the test was already acknowledged by another worker (we timed out)
# Then we only record it if it is successful.
puts "---- ACK recording!"
reporter.record(result)
elsif !failed
puts "---- not failed recording!"
reporter.record(result)
end
end
Expand Down
3 changes: 0 additions & 3 deletions ruby/lib/minitest/queue/build_status_recorder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,13 @@ def record(test)
elsif test.skipped?
self.skips += 1
elsif test.error?
puts "--- increment error in record"
self.errors += 1
elsif test.failure
puts "--- increment failure in record"
self.failures += 1
end

stats = COUNTERS.zip(COUNTERS.map { |c| send(c) }).to_h
if (test.failure || test.error?) && !test.skipped?
puts "--- recording error in record"
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
3 changes: 2 additions & 1 deletion ruby/lib/minitest/queue/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ def report_command
if supervisor.max_test_failed?
puts("Encountered #{supervisor.test_failed} failures")
puts('Encountered too many failed tests. Test run was ended early.')
abort!(msg)
puts(msg)
# abort!(msg)
else
abort!(msg)
end
Expand Down

0 comments on commit 5147be5

Please sign in to comment.