-
Notifications
You must be signed in to change notification settings - Fork 55
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
Do not consider a build with unloadable TestResult
#247
Conversation
TestResult tr = (TestResult) o; | ||
String hyperlink = ModelHyperlinkNote.encodeTo('/' + b.getUrl(), originProject != b.getParent() ? b.getFullDisplayName() : b.getDisplayName()); | ||
if (tr.getTotalCount() == 0) { | ||
listener.getLogger().printf("Build %s has no loadable test results (supposed count %d), skipping%n", tra.getTotalCount(), hyperlink); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note persisted Integer totalCount
, as opposed to actually loading the results and counting.
(cherry picked from commit 93afed3)
#248 works as a hotfix. Ought to add a test case. |
(motivation: jenkinsci/jenkins#7875 / jenkinsci/junit-plugin#520) |
…xecutor-plugin into unloadable-results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🙂
When
junitReport.xml
is malformed, https://github.com/jenkinsci/junit-plugin/blob/b4cf28bc7724c49bc93560c7bf95acdca4bbde1b/src/main/java/hudson/tasks/junit/TestResultAction.java#L227-L240 can causeParallelTestExecutor.getTestResult
to nonetheless consider that build a valid baseline, but with zero results which of course causes split calculation to not work sanely. Ignore such builds, and continue searching for better ones, or at worst fall back to source scanning.