use of com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService in project pinpoint by naver.
the class AgentClassLoaderTest method boot.
@Test
public void boot() throws IOException, ClassNotFoundException {
AgentClassLoader agentClassLoader = new AgentClassLoader(new URL[0]);
agentClassLoader.setBootClass("com.navercorp.pinpoint.bootstrap.DummyAgent");
AgentOption option = new DefaultAgentOption(new DummyInstrumentation(), "testCaseAgent", "testCaseAppName", new DefaultProfilerConfig(), new URL[0], null, new DefaultServiceTypeRegistryService(), new DefaultAnnotationKeyRegistryService());
agentClassLoader.boot(option);
// TODO need verification - implementation for obtaining logger changed
// PLoggerBinder loggerBinder = (PLoggerBinder) agentClassLoader.initializeLoggerBinder();
// PLogger test = loggerBinder.getLogger("test");
// test.info("slf4j logger test");
}
use of com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService in project pinpoint by naver.
the class ServiceTypeTest method findDesc.
@Test
public void findDesc() {
DefaultServiceTypeRegistryService serviceTypeRegistryService = new DefaultServiceTypeRegistryService();
String desc = "UNKNOWN_DB";
List<ServiceType> serviceTypeList = serviceTypeRegistryService.findDesc(desc);
boolean find = false;
for (ServiceType serviceType : serviceTypeList) {
if (serviceType.getDesc().equals(desc)) {
find = true;
}
}
Assert.assertTrue(find);
try {
serviceTypeList.add(ServiceType.INTERNAL_METHOD);
Assert.fail();
} catch (Exception ignored) {
}
}
use of com.navercorp.pinpoint.common.service.DefaultServiceTypeRegistryService in project pinpoint by naver.
the class MockApplicationContext method of.
public static MockApplicationContext of(ProfilerConfig config) {
AgentOption agentOption = new DefaultAgentOption(new DummyInstrumentation(), "mockAgent", "mockApplicationName", config, new URL[0], null, new DefaultServiceTypeRegistryService(), new DefaultAnnotationKeyRegistryService());
InterceptorRegistryBinder binder = new TestInterceptorRegistryBinder();
binder.bind();
return new MockApplicationContext(agentOption, binder);
}
Aggregations