use of com.navercorp.pinpoint.profiler.util.TestInterceptorRegistryBinder in project pinpoint by naver.
the class DefaultApplicationContextTest method newApplicationContext.
private DefaultApplicationContext newApplicationContext() {
ProfilerConfig profilerConfig = spy(new DefaultProfilerConfig());
when(profilerConfig.getStaticResourceCleanup()).thenReturn(true);
// when(profilerConfig.getTransportModule()).thenReturn("GRPC");
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 interceptorRegistryModule = InterceptorRegistryModule.wrap(interceptorRegistryBinder);
ModuleFactory moduleFactory = new OverrideModuleFactory(interceptorRegistryModule);
return new DefaultApplicationContext(agentOption, moduleFactory);
}
use of com.navercorp.pinpoint.profiler.util.TestInterceptorRegistryBinder in project pinpoint by naver.
the class JavassistEngineTest method newJavassistEngine.
private InstrumentEngine newJavassistEngine() {
Instrumentation instrumentation = mock(Instrumentation.class);
ObjectBinderFactory objectBinderFactory = mock(ObjectBinderFactory.class);
Provider<ApiMetaDataService> apiMetaDataService = Providers.of(mock(ApiMetaDataService.class));
InterceptorRegistryBinder binder = new TestInterceptorRegistryBinder();
return new JavassistEngine(instrumentation, objectBinderFactory, binder, apiMetaDataService, null);
}
use of com.navercorp.pinpoint.profiler.util.TestInterceptorRegistryBinder 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);
}
Aggregations