use of com.navercorp.pinpoint.web.dao.hbase.SpanQueryBuilder in project pinpoint by naver.
the class FilteringSpanDecoderTest method constructorFailureTest3.
@Test(expected = NullPointerException.class)
public void constructorFailureTest3() {
SpanDecoder mockSpanDecoder = Mockito.mock(SpanDecoder.class);
TransactionId transactionId = Random.createTransactionId();
GetTraceInfo getTraceInfo = new GetTraceInfo(transactionId);
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
}
use of com.navercorp.pinpoint.web.dao.hbase.SpanQueryBuilder in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest2.
@Test
public void decodeTest2() {
SpanBo spanBo = Random.createSpanBo();
SpanDecoder mockSpanDecoder = createMockSpanDecoder(spanBo);
GetTraceInfo getTraceInfo = createGetTraceInfo(spanBo);
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
FilteringSpanDecoder filteringSpanDecoder = new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
Object result = filteringSpanDecoder.decode(null, null, null);
Assert.assertNotNull(result);
}
use of com.navercorp.pinpoint.web.dao.hbase.SpanQueryBuilder in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest3.
@Test
public void decodeTest3() {
final String applicationId = "test";
SpanBo spanBo = Random.createSpanBo(applicationId);
SpanDecoder mockSpanDecoder = createMockSpanDecoder(spanBo);
GetTraceInfo getTraceInfo = new GetTraceInfo(spanBo.getTransactionId(), new SpanHint(spanBo.getCollectorAcceptTime(), spanBo.getElapsed(), applicationId + "1"));
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
FilteringSpanDecoder filteringSpanDecoder = new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
Object result = filteringSpanDecoder.decode(null, null, null);
Assert.assertNull(result);
}
use of com.navercorp.pinpoint.web.dao.hbase.SpanQueryBuilder in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest1.
@Test
public void decodeTest1() {
SpanDecoder mockSpanDecoder = createMockSpanDecoder();
GetTraceInfo getTraceInfo = createGetTraceInfo();
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
FilteringSpanDecoder filteringSpanDecoder = new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
Object result = filteringSpanDecoder.decode(null, null, null);
Assert.assertNull(result);
}
use of com.navercorp.pinpoint.web.dao.hbase.SpanQueryBuilder in project pinpoint by naver.
the class FilteringSpanDecoderTest method decodeTest4.
@Test
public void decodeTest4() {
final String applicationId = "test";
SpanBo spanBo = Random.createSpanBo(applicationId);
SpanDecoder mockSpanDecoder = createMockSpanDecoder(spanBo);
GetTraceInfo getTraceInfo = new GetTraceInfo(spanBo.getTransactionId(), new SpanHint(spanBo.getCollectorAcceptTime(), spanBo.getElapsed(), null));
SpanQueryBuilder builder = new SpanQueryBuilder();
SpanQuery query = builder.build(getTraceInfo);
FilteringSpanDecoder filteringSpanDecoder = new FilteringSpanDecoder(mockSpanDecoder, query.getSpanFilter());
Object result = filteringSpanDecoder.decode(null, null, null);
Assert.assertNotNull(result);
}
Aggregations