-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
Co-authored-by: Tim Jacomb <[email protected]> Co-authored-by: Edgars Batna <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,7 @@ | |
import org.kohsuke.stapler.StaplerResponse; | ||
import org.kohsuke.stapler.export.Exported; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.*; | ||
|
||
/** | ||
* Cumulative test result of a test class. | ||
|
@@ -44,7 +42,7 @@ public final class ClassResult extends TabulatedResult implements Comparable<Cla | |
private final String className; // simple name | ||
private transient String safeName; | ||
|
||
private final List<CaseResult> cases = new ArrayList<>(); | ||
private final Set<CaseResult> cases = new TreeSet<CaseResult>(); | ||
|
||
private int passCount,failCount,skipCount; | ||
|
||
|
@@ -146,7 +144,7 @@ public Object getDynamic(String name, StaplerRequest req, StaplerResponse rsp) { | |
|
||
@Exported(name="child") | ||
@Override | ||
public List<CaseResult> getChildren() { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jtnord
Member
|
||
public Collection<CaseResult> getChildren() { | ||
return cases; | ||
} | ||
|
||
|
@@ -216,7 +214,6 @@ else if(r.isPassed()) { | |
|
||
void freeze() { | ||
this.tally(); | ||
Collections.sort(cases); | ||
} | ||
|
||
public String getClassName() { | ||
|
The refactoring broke https://plugins.jenkins.io/test-stability/
java.lang.NoSuchMethodError: 'java.util.List hudson.tasks.junit.ClassResult.getChildren()'
at PluginClassLoader for test-stability//de.esailors.jenkins.teststability.StabilityTestDataPublisher.getClassAndCaseResults(StabilityTestDataPublisher.java:274)
at PluginClassLoader for test-stability//de.esailors.jenkins.teststability.StabilityTestDataPublisher.contributeTestData(StabilityTestDataPublisher.java:76)
at PluginClassLoader for junit//hudson.tasks.junit.JUnitResultArchiver.parseAndSummarize(JUnitResultArchiver.java:297)
at PluginClassLoader for junit//hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:63)
at PluginClassLoader for junit//hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:29)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)