Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBr committed Aug 27, 2024
1 parent fe8305f commit 35961c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions ruby/lib/minitest/queue/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def bisect_command

failing_order = queue.candidates
step("Final validation")
status = if run_tests_in_fork(failing_order)
if run_tests_in_fork(failing_order)
step(yellow("The bisection was inconclusive, there might not be any leaky test here."))
File.write('log/test_order.log', "")
exit! 1
Expand Down Expand Up @@ -314,7 +314,8 @@ def report_grind_command
private

attr_reader :queue_config, :options, :command, :argv
attr_accessor :queue, :queue_url, :grind_list, :grind_count, :load_paths, :verbose
attr_writer :queue_url
attr_accessor :queue, :grind_list, :grind_count, :load_paths, :verbose

def require_worker_id!
if queue.distributed?
Expand Down
9 changes: 1 addition & 8 deletions ruby/test/integration/minitest_redis_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def test_max_test_failed
assert_equal 'Ran 47 tests, 47 assertions, 3 failures, 0 errors, 0 skips, 44 requeues in X.XXs', output

# Run the reporter
exit_code = nil
out, err = capture_subprocess_io do
system(
@exe, 'report',
Expand Down Expand Up @@ -862,12 +861,6 @@ def test_redis_reporter
)
end

warning = <<~END
[WARNING] Atest#test_bar was picked up by another worker because it didn't complete in the allocated 2 seconds.
You may want to either optimize this test or bump ci-queue timeout.
It's also possible that the worker that was processing it was terminated without being able to report back.
END

warnings_file.rewind
content = JSON.parse(warnings_file.read)
assert_equal 1, content.size
Expand Down Expand Up @@ -953,7 +946,7 @@ def test_application_error

assert_equal 42, $?.exitstatus

out, err = capture_subprocess_io do
out, _ = capture_subprocess_io do
system(
@exe, 'report',
'--queue', @redis_url,
Expand Down

0 comments on commit 35961c4

Please sign in to comment.