use of zipkin.storage.AsyncSpanStore in project zipkin by openzipkin.
the class InternalGuavaSpanStoreAdapterTest method getTraces_exception.
@Test
public void getTraces_exception() throws Exception {
QueryRequest request = QueryRequest.builder().build();
doAnswer(answer(c -> c.onError(new IllegalStateException("failed")))).when(asyncSpanStore).getTraces(eq(request), any(Callback.class));
thrown.expect(ExecutionException.class);
thrown.expectCause(isA(IllegalStateException.class));
spanStore.getTraces(request).get();
}
use of zipkin.storage.AsyncSpanStore in project zipkin by openzipkin.
the class InternalGuavaSpanStoreAdapterTest method getTraces_success.
@Test
public void getTraces_success() throws Exception {
QueryRequest request = QueryRequest.builder().build();
doAnswer(answer(c -> c.onSuccess(asList(TRACE)))).when(asyncSpanStore).getTraces(eq(request), any(Callback.class));
assertThat(spanStore.getTraces(request).get()).containsExactly(TRACE);
}
Aggregations