use of org.gradle.internal.dispatch.ContextClassLoaderProxy in project gradle by gradle.
the class TestWorker method startReceivingTests.
private void startReceivingTests(WorkerProcessContext workerProcessContext, ServiceRegistry testServices) {
TestClassProcessor targetProcessor = factory.create(testServices);
IdGenerator<Object> idGenerator = testServices.get(IdGenerator.class);
targetProcessor = new WorkerTestClassProcessor(targetProcessor, idGenerator.generateId(), workerProcessContext.getDisplayName(), testServices.get(TimeProvider.class));
ContextClassLoaderProxy<TestClassProcessor> proxy = new ContextClassLoaderProxy<TestClassProcessor>(TestClassProcessor.class, targetProcessor, workerProcessContext.getApplicationClassLoader());
processor = proxy.getSource();
ObjectConnection serverConnection = workerProcessContext.getServerConnection();
serverConnection.useParameterSerializers(TestEventSerializer.create());
this.resultProcessor = serverConnection.addOutgoing(TestResultProcessor.class);
serverConnection.addIncoming(RemoteTestClassProcessor.class, this);
serverConnection.connect();
}
Aggregations