use of org.gradle.api.internal.tasks.testing.results.DefaultTestResult in project gradle by gradle.
the class FailFastTestListenerInternal method completed.
@Override
public void completed(TestDescriptorInternal testDescriptor, TestResult testResult, TestCompleteEvent completeEvent) {
TestResult delegateResult = testResult;
if (failed) {
if (testDescriptor.isComposite()) {
delegateResult = new DefaultTestResult(TestResult.ResultType.FAILURE, testResult.getStartTime(), testResult.getEndTime(), testResult.getTestCount(), testResult.getSuccessfulTestCount(), testResult.getFailedTestCount(), testResult.getExceptions());
} else {
delegateResult = new DefaultTestResult(TestResult.ResultType.SKIPPED, testResult.getStartTime(), testResult.getEndTime(), testResult.getTestCount(), testResult.getSuccessfulTestCount(), testResult.getFailedTestCount(), testResult.getExceptions());
}
}
delegate.completed(testDescriptor, delegateResult, completeEvent);
if (!failed && testResult.getResultType() == TestResult.ResultType.FAILURE) {
failed = true;
testExecuter.stopNow();
}
}
Aggregations