Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect scan results with retry feature and -test-repetition-relaunch-enabled #21989

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion trainer/lib/trainer/test_parser.rb
Expand Up @@ -337,7 +337,16 @@ def summaries_to_data(summaries, failures, output_remove_retry_attempts: false)
row
end

self.data = rows
self.data = remove_repetition_retries(rows, output_remove_retry_attempts)
end

def remove_repetition_retries(rows, output_remove_retry_attempts)
if output_remove_retry_attempts
rows.group_by { |row| row[:test_name] }
.map { |_, group| group.min_by { |row| row[:number_of_failures_excluding_retries] } }
else
rows
end
end

def test_summaries_to_configuration_names(test_summaries)
Expand Down