use of org.gradle.tooling.internal.provider.events.DefaultTestStartedProgressEvent in project gradle by gradle.
the class ClientForwardingTestOperationListener method started.
@Override
public void started(BuildOperationDescriptor buildOperation, OperationStartEvent startEvent) {
Object details = buildOperation.getDetails();
if (details instanceof ExecuteTaskBuildOperationDetails) {
Task task = ((ExecuteTaskBuildOperationDetails) details).getTask();
if (!(task instanceof Test)) {
return;
}
runningTasks.put(buildOperation.getId(), task.getPath());
} else if (details instanceof ExecuteTestBuildOperationType.Details) {
ExecuteTestBuildOperationType.Details testOperationDetails = (ExecuteTestBuildOperationType.Details) details;
TestDescriptorInternal testDescriptor = (TestDescriptorInternal) testOperationDetails.getTestDescriptor();
eventConsumer.dispatch(new DefaultTestStartedProgressEvent(testOperationDetails.getStartTime(), adapt(testDescriptor)));
}
}
Aggregations