24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/minitest/distributed/reporters/distributed_summary_reporter.rb', line 24
def report
print_discard_warning if local_results.discards > 0 && !current_attempt_truncated? && !superseded?
if superseded?
print_local_results("This worker was superseded; its local results do not affect the authoritative run.")
return
elsif registration_rejected?
print_local_results("Combined results are unavailable because coordinator registration was rejected.")
return
elsif truncation_state_invalid?
print_local_results("Combined results are unavailable because the retained truncation state is incomplete.")
return
elsif coordinator_stalled?
print_local_results("Combined results are unavailable because the Redis coordinator state is invalid.")
return
elsif retry_refused_due_to_truncation?
io.puts("Cannot retry a run that was cut short during the previous attempt.")
print_local_results("Combined results were not read for this rejected retry.")
return
elsif current_attempt_truncated?
io.puts("The run was cut short after another worker reached the max-failures limit.")
print_local_results("Combined results were not read after truncation.")
return
elsif configuration.coordinator.aborted?
print_local_results("Combined results are unavailable because the coordinator aborted this worker.")
return
end
persisted_truncation = configuration.coordinator.persisted_truncation?
@combined_results = nil
unless configuration.coordinator.valid_combined_results?
if persisted_truncation
io.puts("The run was cut short after reaching the limit of #{configuration.max_failures} test failures.")
end
print_local_results("Combined results are unavailable because terminal coordinator state is invalid.")
return
end
if persisted_truncation
io.puts("The run was cut short after reaching the limit of #{configuration.max_failures} test failures.")
io.puts
end
formatted_duration = format("(in %0.3fs)", Minitest.clock_time - @start_time)
if combined_results == local_results
io.puts("Results: #{combined_results} #{formatted_duration}")
else
io.puts("This worker: #{local_results} #{formatted_duration}")
io.puts("Combined results: #{combined_results}")
end
end
|