use of com.navercorp.pinpoint.test.plugin.util.ChildFirstClassLoader in project pinpoint by naver.
the class SharedPinpointPluginTest method execute.
public void execute() throws Exception {
logTestInformation();
ClassLoader mavenDependencyResolverClassLoader = new ChildFirstClassLoader(URLUtils.fileToUrls(mavenDependencyResolverClassPaths));
File testClazzLocation = new File(testLocation);
List<TestInfo> testInfos = newTestCaseInfo(testParameters, testClazzLocation, repositoryUrls, mavenDependencyResolverClassLoader);
executes(testInfos);
}
use of com.navercorp.pinpoint.test.plugin.util.ChildFirstClassLoader in project pinpoint by naver.
the class SharedPinpointPluginTest method createTestClassLoader.
private ClassLoader createTestClassLoader(TestInfo testInfo) {
List<File> dependencyFileList = testInfo.getDependencyFileList();
if (logger.isDebugEnabled()) {
for (File dependency : dependencyFileList) {
logger.debug("testcase cl lib :{}", dependency);
}
}
URL[] urls = URLUtils.fileToUrls(dependencyFileList);
final ClassLoader testClassLoader = new ChildFirstClassLoader(urls, ProfilerClass.PINPOINT_PROFILER_CLASS);
return testClassLoader;
}
use of com.navercorp.pinpoint.test.plugin.util.ChildFirstClassLoader in project pinpoint by pinpoint-apm.
the class SharedPinpointPluginTest method createTestClassLoader.
private ClassLoader createTestClassLoader(TestInfo testInfo) {
List<File> dependencyFileList = testInfo.getDependencyFileList();
if (logger.isDebugEnabled()) {
for (File dependency : dependencyFileList) {
logger.debug("testcase cl lib :{}", dependency);
}
}
URL[] urls = URLUtils.fileToUrls(dependencyFileList);
final ClassLoader testClassLoader = new ChildFirstClassLoader(urls, ProfilerClass.PINPOINT_PROFILER_CLASS);
return testClassLoader;
}
use of com.navercorp.pinpoint.test.plugin.util.ChildFirstClassLoader in project pinpoint by naver.
the class ForkedPinpointPluginTest method getClassLoader.
private static ClassLoader getClassLoader(String agentType) throws IOException {
if (agentType.startsWith(CHILD_CLASS_PATH_PREFIX)) {
String jars = agentType.substring(CHILD_CLASS_PATH_PREFIX.length());
final URL[] urls = getJarUrls(jars);
for (URL url : urls) {
if (logger.isDebugEnabled()) {
logger.debug("child-runner lib:{}", url);
}
}
logger.debug("ChildFirstClassLoader");
return new ChildFirstClassLoader(urls, ClassLoader.getSystemClassLoader());
}
logger.debug("SystemClassloader");
return ClassLoader.getSystemClassLoader();
}
use of com.navercorp.pinpoint.test.plugin.util.ChildFirstClassLoader in project pinpoint by pinpoint-apm.
the class ForkedPinpointPluginTest method getClassLoader.
private static ClassLoader getClassLoader(String agentType) throws IOException {
if (agentType.startsWith(CHILD_CLASS_PATH_PREFIX)) {
String jars = agentType.substring(CHILD_CLASS_PATH_PREFIX.length());
final URL[] urls = getJarUrls(jars);
for (URL url : urls) {
if (logger.isDebugEnabled()) {
logger.debug("child-runner lib:{}", url);
}
}
logger.debug("ChildFirstClassLoader");
return new ChildFirstClassLoader(urls, ClassLoader.getSystemClassLoader());
}
logger.debug("SystemClassloader");
return ClassLoader.getSystemClassLoader();
}
Aggregations