Search in sources :

Example 6 with TCmdActiveThreadDump

use of com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDump 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);
    }
}
Also used : TCmdActiveThreadDump(com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDump) TCmdActiveThreadDumpRes(com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDumpRes) ActiveTraceInfo(com.navercorp.pinpoint.profiler.context.active.ActiveTraceInfo) Test(org.junit.Test)

Aggregations

TCmdActiveThreadDump (com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDump)6 TCmdActiveThreadDumpRes (com.navercorp.pinpoint.thrift.dto.command.TCmdActiveThreadDumpRes)6 ActiveTraceInfo (com.navercorp.pinpoint.profiler.context.active.ActiveTraceInfo)4 Test (org.junit.Test)4 TActiveThreadDump (com.navercorp.pinpoint.thrift.dto.command.TActiveThreadDump)3 PinpointRouteResponse (com.navercorp.pinpoint.web.cluster.PinpointRouteResponse)1 AgentActiveThreadDumpFactory (com.navercorp.pinpoint.web.vo.AgentActiveThreadDumpFactory)1 AgentActiveThreadDumpList (com.navercorp.pinpoint.web.vo.AgentActiveThreadDumpList)1 AgentInfo (com.navercorp.pinpoint.web.vo.AgentInfo)1 TException (org.apache.thrift.TException)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1