Skip to content

Commit

Permalink
getChildResults(): reduce the amount of invocation of getResult() met…
Browse files Browse the repository at this point in the history
…hod (#3396)
  • Loading branch information
oleg-rd authored Feb 5, 2024
1 parent 762c257 commit 573bf3c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,14 @@ private TestResult getResultFromChildren() {
return TestResultList.overallResultFrom(getChildResults());
}


private List<TestResult> getChildResults() {
List<TestResult> childResults = new ArrayList<>();
for (TestStep step : getChildren()) {
if (step != null && step.getResult() != null) {
childResults.add(step.getResult());
if (step != null) {
TestResult stepResult = step.getResult();
if (stepResult != null) {
childResults.add(stepResult);
}
}
}
return childResults;
Expand Down

0 comments on commit 573bf3c

Please sign in to comment.