lib/minitest/queue.rb in ci-queue-0.40.0 vs lib/minitest/queue.rb in ci-queue-0.41.0
- old
+ new
@@ -242,22 +242,19 @@
queue.report_failure!
else
queue.report_success!
end
- requeued = false
if failed && CI::Queue.requeueable?(result) && queue.requeue(example)
- requeued = true
result.requeue!
reporter.record(result)
- elsif queue.acknowledge(example) || !failed
+ elsif queue.acknowledge(example)
+ reporter.record(result)
+ queue.increment_test_failed if failed
+ elsif !failed
# If the test was already acknowledged by another worker (we timed out)
# Then we only record it if it is successful.
reporter.record(result)
- end
-
- if !requeued && failed
- queue.increment_test_failed
end
end
end
end
end