use of org.gradle.api.tasks.testing.TestResult 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();
}
}
use of org.gradle.api.tasks.testing.TestResult in project gradle by gradle.
the class TestListenerBuildOperationAdapter method completed.
@Override
public void completed(TestDescriptorInternal testDescriptor, TestResult testResult, TestCompleteEvent completeEvent) {
long currentTime = clock.getCurrentTime();
InProgressExecuteTestBuildOperation runningOp = runningTests.remove(testDescriptor);
listener.finished(runningOp.descriptor, new OperationFinishEvent(runningOp.startTime, currentTime, testResult.getException(), new Result(testResult)));
}
Aggregations