use of com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDumpRes in project pinpoint by naver.
the class ActiveThreadDumpServiceTest method basicFunctionTest4.
@Test
public void basicFunctionTest4() throws Exception {
List<WaitingJob> waitingJobList = createWaitingJobList(CREATE_SIZE);
try {
List<ActiveTraceInfo> activeTraceInfoList = createMockActiveTraceInfoList(CREATE_SIZE, DEFAULT_TIME_MILLIS, TIME_DIFF_INTERVAL, waitingJobList);
List<ActiveTraceInfo> copied = shuffle(activeTraceInfoList);
int targetThreadNameSize = 3;
List<String> threadNameList = extractThreadNameList(copied.subList(0, targetThreadNameSize), targetThreadNameSize);
int targetTraceIdSize = 3;
List<Long> localTraceIdList = extractLocalTraceIdList(copied.subList(targetThreadNameSize, CREATE_SIZE), targetTraceIdSize);
TCmdActiveThreadDump tCmdActiveThreadDump = createRequest(0, threadNameList, localTraceIdList);
ActiveThreadDumpService service = createService(activeTraceInfoList);
TCmdActiveThreadDumpRes response = (TCmdActiveThreadDumpRes) service.requestCommandService(tCmdActiveThreadDump);
Assert.assertEquals(targetThreadNameSize + targetTraceIdSize, response.getThreadDumpsSize());
} finally {
clearResource(waitingJobList);
}
}
use of com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDumpRes in project pinpoint by naver.
the class ActiveThreadDumpServiceTest method basicFunctionTest2.
@Test
public void basicFunctionTest2() throws Exception {
List<WaitingJob> waitingJobList = createWaitingJobList(CREATE_SIZE);
try {
List<ActiveTraceInfo> activeTraceInfoList = createMockActiveTraceInfoList(CREATE_SIZE, DEFAULT_TIME_MILLIS, TIME_DIFF_INTERVAL, waitingJobList);
TCmdActiveThreadDump tCmdActiveThreadDump = createRequest(0, null, Arrays.asList(1L));
ActiveThreadDumpService service = createService(activeTraceInfoList);
TCmdActiveThreadDumpRes response = (TCmdActiveThreadDumpRes) service.requestCommandService(tCmdActiveThreadDump);
Assert.assertEquals(1, response.getThreadDumpsSize());
} finally {
clearResource(waitingJobList);
}
}
Aggregations