use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class InvokeMethodInterceptorTest method spyTraceContext.
private TraceContext spyTraceContext() {
ProfilerConfig profilerConfig = new DefaultProfilerConfig();
TraceContext traceContext = MockTraceContextFactory.newTestTraceContext(profilerConfig);
return spy(traceContext);
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class InvokeMethodInterceptorTest method spyTraceContext.
private TraceContext spyTraceContext() {
ProfilerConfig profilerConfig = new DefaultProfilerConfig();
TraceContext traceContext = MockTraceContextFactory.newTestTraceContext(profilerConfig);
return spy(traceContext);
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class JavassistClassTest method getTestClassLoader.
private TestClassLoader getTestClassLoader() {
PLoggerFactory.initialize(new Slf4jLoggerBinder());
DefaultProfilerConfig profilerConfig = new DefaultProfilerConfig();
profilerConfig.setApplicationServerType(ServiceType.TEST_STAND_ALONE.getName());
MockApplicationContext applicationContext = MockApplicationContext.of(profilerConfig);
TestClassLoader testClassLoader = new TestClassLoader(applicationContext);
testClassLoader.initialize();
return testClassLoader;
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class AccessorInjectionTest method getTestClassLoader.
private TestClassLoader getTestClassLoader() {
PLoggerFactory.initialize(new Slf4jLoggerBinder());
DefaultProfilerConfig profilerConfig = new DefaultProfilerConfig();
profilerConfig.setApplicationServerType(ServiceType.TEST_STAND_ALONE.getName());
MockApplicationContext applicationContext = MockApplicationContext.of(profilerConfig);
TestClassLoader testClassLoader = new TestClassLoader(applicationContext);
testClassLoader.initialize();
return testClassLoader;
}
use of com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig in project pinpoint by naver.
the class MockApplicationContextModuleTest method test.
@Test
public void test() {
ProfilerConfig profilerConfig = new DefaultProfilerConfig();
AgentOption agentOption = new DefaultAgentOption(new DummyInstrumentation(), "mockAgent", "mockApplicationName", profilerConfig, new URL[0], null, new DefaultServiceTypeRegistryService(), new DefaultAnnotationKeyRegistryService());
final PluginApplicationContextModule pluginApplicationContextModule = new PluginApplicationContextModule();
PluginTestAgent pluginTestAgent = new PluginTestAgent(agentOption) {
@Override
protected ApplicationContext newApplicationContext(AgentOption agentOption, InterceptorRegistryBinder interceptorRegistryBinder) {
ApplicationContext applicationContext = new DefaultApplicationContext(agentOption, interceptorRegistryBinder) {
@Override
protected Module newApplicationContextModule(AgentOption agentOption, InterceptorRegistryBinder interceptorRegistryBinder) {
Module applicationContextModule = super.newApplicationContextModule(agentOption, interceptorRegistryBinder);
// PluginApplicationContextModule pluginApplicationContextModule = new PluginApplicationContextModule();
return Modules.override(applicationContextModule).with(pluginApplicationContextModule);
}
};
return applicationContext;
}
};
try {
pluginTestAgent.start();
} finally {
pluginTestAgent.stop(true);
}
}
Aggregations