use of com.navercorp.pinpoint.profiler.context.module.OverrideModuleFactory in project pinpoint by naver.
the class DependencyGraph method newApplicationContext.
private DefaultApplicationContext newApplicationContext() {
ProfilerConfig profilerConfig = spy(new DefaultProfilerConfig());
Mockito.when(profilerConfig.getStaticResourceCleanup()).thenReturn(true);
Instrumentation instrumentation = mock(Instrumentation.class);
AgentOption agentOption = new DefaultAgentOption(instrumentation, "mockAgentId", "mockAgentName", "mockApplicationName", false, profilerConfig, Collections.<String>emptyList(), Collections.<String>emptyList());
InterceptorRegistryBinder interceptorRegistryBinder = new TestInterceptorRegistryBinder();
Module testInterceptorRegistryModule = InterceptorRegistryModule.wrap(interceptorRegistryBinder);
ModuleFactory moduleFactory = new OverrideModuleFactory(testInterceptorRegistryModule);
return new DefaultApplicationContext(agentOption, moduleFactory);
}
use of com.navercorp.pinpoint.profiler.context.module.OverrideModuleFactory in project pinpoint by naver.
the class MockTraceContextFactory method newMockApplicationContext.
public static DefaultApplicationContext newMockApplicationContext(ProfilerConfig profilerConfig) {
Module loggingModule = new LoggingModule();
InterceptorRegistryBinder interceptorRegistryBinder = new EmptyInterceptorRegistryBinder();
Module interceptorRegistryModule = InterceptorRegistryModule.wrap(interceptorRegistryBinder);
ModuleFactory moduleFactory = new OverrideModuleFactory(loggingModule, interceptorRegistryModule);
MockApplicationContextFactory factory = new MockApplicationContextFactory();
return factory.build(profilerConfig, moduleFactory);
}
Aggregations