use of zipkin2.storage.QueryRequest in project zipkin by openzipkin.
the class ElasticsearchSpanStoreTest method searchDisabled_doesntMakeRemoteQueryRequests.
@Test
void searchDisabled_doesntMakeRemoteQueryRequests() throws Exception {
storage.close();
storage = ElasticsearchStorage.newBuilder(() -> WebClient.of(server.httpUri())).searchEnabled(false).build();
// skip template check
ElasticsearchSpanStore spanStore = new ElasticsearchSpanStore(storage);
QueryRequest request = QueryRequest.newBuilder().endTs(TODAY).lookback(DAY).limit(10).build();
assertThat(spanStore.getTraces(request).execute()).isEmpty();
assertThat(spanStore.getServiceNames().execute()).isEmpty();
assertThat(spanStore.getSpanNames("icecream").execute()).isEmpty();
assertThat(server.takeRequest(100, TimeUnit.MILLISECONDS)).isNull();
}
Aggregations