-
Notifications
You must be signed in to change notification settings - Fork 341
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
Restore compatiblity with junit-sql-storage #630
Conversation
durationColor.put("value", duration); | ||
if (to.isPassed() || (to.getPassCount() > 0 && to.getFailCount() == 0)) { |
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.
minor behaviour change here but should be safe enough
|
||
public HistoryTestResultSummary(Run<?, ?> run, hudson.tasks.test.TestResult resultInRun, | ||
public HistoryTestResultSummary(Run<?, ?> run, |
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.
this was the critical change, adding resultInRun
broke the plugin and I can't see a way to retrieve it there. The API could be modified to maybe pass some more info down but it didn't seem necessary the only additional information that is missing now is the id of the test report which could be stored maybe if required
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.
Any reason to not just pass null to it? Without the final URL it's very cumbersome to navigate single test or test subset history.
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.
can't remember offhand, would be best to keep the same features though i.e. it shouldn't be harder to navigate the tests when using pluggable storage
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.
Well, it is rather nearly impossible to navigate with 10K+ tests. This is what a user normally expects when viewing the history at a certain level. After all, the numbers shown are for the test and test set, not the overall build, but the URL is pointing to overall build, so it is a bug depending on the perspective.
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.
feel free to send a PR that maintains compatibility
@@ -476,7 +476,7 @@ public List<HistoryTestResultSummary> getHistorySummary(int offset) { | |||
Job<?, ?> theJob = Jenkins.get().getItemByFullName(getJobName(), Job.class); | |||
if (theJob != null) { | |||
Run<?, ?> run = theJob.getBuildByNumber(buildNumber); | |||
historyTestResultSummaries.add(new HistoryTestResultSummary(run, null, duration, failed, skipped, passed)); |
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.
this shouldn't have had null passed as it made the test run but if any one actually tried to access the history view they got null pointers
and some minor cleanup at the same time, bunch of unused variables mostly.
Also fixed clicking on builds in the charts, variable wasn't defined properly before
cc @mdealer
noticed in jenkinsci/junit-sql-storage-plugin#430
caused by #625
Testing done
manually tested both junit and junit-sql-storage
Submitter checklist