diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java index 3d3c94ac86b2..2a8c5bbe2e09 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java @@ -230,11 +230,11 @@ private Stream finishedExecutions() { private Stream finishedExecutionsByStatus(Status status) { Preconditions.notNull(status, "Status must not be null"); return finishedExecutions()// - .filter(execution -> execution.getTerminationInfo().getExecutionResult().getStatus().equals(status)); + .filter(execution -> execution.getTerminationInfo().getExecutionResult().getStatus() == status); } private Stream executionsByTerminationInfo(Predicate predicate) { - return this.executions.stream().filter(execution -> predicate.test(execution.getTerminationInfo())); + return filter(execution -> predicate.test(execution.getTerminationInfo())); } /**