Search in sources :

Example 1 with PipelineContext

use of com.alipay.sofa.ark.spi.pipeline.PipelineContext in project sofa-ark by alipay.

the class TestHelper method createNoneDelegateTestClassLoader.

public ClassLoader createNoneDelegateTestClassLoader() {
    PipelineContext context = arkContainer.getPipelineContext();
    URL[] classpath = context.getLaunchCommand().getClasspath();
    ClassLoaderService classloaderService = arkContainer.getArkServiceContainer().getService(ClassLoaderService.class);
    return new NoneDelegateTestClassLoader(MOCK_BIZ_IDENTITY, classpath);
}
Also used : PipelineContext(com.alipay.sofa.ark.spi.pipeline.PipelineContext) URL(java.net.URL) ClassLoaderService(com.alipay.sofa.ark.spi.service.classloader.ClassLoaderService)

Example 2 with PipelineContext

use of com.alipay.sofa.ark.spi.pipeline.PipelineContext in project sofa-ark by alipay.

the class TestHelper method createTestClassLoader.

public ClassLoader createTestClassLoader() {
    PipelineContext context = arkContainer.getPipelineContext();
    URL[] classpath = context.getLaunchCommand().getClasspath();
    ClassLoaderService classloaderService = arkContainer.getArkServiceContainer().getService(ClassLoaderService.class);
    return new TestClassLoader(MOCK_BIZ_IDENTITY, classpath, classloaderService.getSystemClassLoader());
}
Also used : PipelineContext(com.alipay.sofa.ark.spi.pipeline.PipelineContext) URL(java.net.URL) ClassLoaderService(com.alipay.sofa.ark.spi.service.classloader.ClassLoaderService)

Aggregations

PipelineContext (com.alipay.sofa.ark.spi.pipeline.PipelineContext)2 ClassLoaderService (com.alipay.sofa.ark.spi.service.classloader.ClassLoaderService)2 URL (java.net.URL)2