use of com.navercorp.pinpoint.profiler.context.MockTraceContextFactory in project pinpoint by naver.
the class ActiveTraceRepositoryTest method setUp.
@Before
public void setUp() {
final ProfilerConfig profilerConfig = Mockito.mock(ProfilerConfig.class);
Mockito.when(profilerConfig.isTraceAgentActiveThread()).thenReturn(true);
Mockito.when(profilerConfig.isSamplingEnable()).thenReturn(true);
Mockito.when(profilerConfig.getSamplingRate()).thenReturn(SAMPLING_RATE);
MockTraceContextFactory mockTraceContextFactory = MockTraceContextFactory.newTestTraceContextFactory(profilerConfig);
this.traceContext = mockTraceContextFactory.getTraceContext();
this.transactionCounter = new DefaultTransactionCounter(mockTraceContextFactory.getIdGenerator());
this.activeTraceRepository = mockTraceContextFactory.getActiveTraceRepository();
}
Aggregations