Search in sources :

Example 1 with DecoratingTestDescriptor

use of org.gradle.api.internal.tasks.testing.DecoratingTestDescriptor in project gradle by gradle.

the class TestWorkerProgressListener method createProgressLoggerDescription.

private String createProgressLoggerDescription(TestDescriptorInternal testDescriptor) {
    DecoratingTestDescriptor decoratingTestDescriptor = (DecoratingTestDescriptor) testDescriptor;
    DefaultTestClassDescriptor defaultTestClassDescriptor = (DefaultTestClassDescriptor) decoratingTestDescriptor.getDescriptor();
    return "Executing test " + JavaClassNameFormatter.abbreviateJavaPackage(defaultTestClassDescriptor.getClassName(), MAX_TEST_NAME_LENGTH);
}
Also used : DecoratingTestDescriptor(org.gradle.api.internal.tasks.testing.DecoratingTestDescriptor) DefaultTestClassDescriptor(org.gradle.api.internal.tasks.testing.DefaultTestClassDescriptor)

Example 2 with DecoratingTestDescriptor

use of org.gradle.api.internal.tasks.testing.DecoratingTestDescriptor in project gradle by gradle.

the class StateTrackingTestResultProcessor method started.

@Override
public final void started(TestDescriptorInternal test, TestStartEvent event) {
    TestDescriptorInternal parent = null;
    if (event.getParentId() != null) {
        parent = executing.get(event.getParentId()).test;
    }
    TestState state = new TestState(new DecoratingTestDescriptor(test, parent), event, executing);
    TestState oldState = executing.put(test.getId(), state);
    if (oldState != null) {
        throw new IllegalArgumentException(String.format("Received a start event for %s with duplicate id '%s'.", test, test.getId()));
    }
    delegate.started(state.test, event);
}
Also used : TestDescriptorInternal(org.gradle.api.internal.tasks.testing.TestDescriptorInternal) DecoratingTestDescriptor(org.gradle.api.internal.tasks.testing.DecoratingTestDescriptor)

Aggregations

DecoratingTestDescriptor (org.gradle.api.internal.tasks.testing.DecoratingTestDescriptor)2 DefaultTestClassDescriptor (org.gradle.api.internal.tasks.testing.DefaultTestClassDescriptor)1 TestDescriptorInternal (org.gradle.api.internal.tasks.testing.TestDescriptorInternal)1