Search in sources :

Example 11 with QueryRequest

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();
}
Also used : QueryRequest(zipkin2.storage.QueryRequest) Test(org.junit.jupiter.api.Test)

Aggregations

QueryRequest (zipkin2.storage.QueryRequest)7 Map (java.util.Map)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Test (org.junit.jupiter.api.Test)2 Span (zipkin2.Span)2 Blocking (com.linecorp.armeria.server.annotation.Blocking)1 Get (com.linecorp.armeria.server.annotation.Get)1 Arrays.asList (java.util.Arrays.asList)1 LinkedHashMap (java.util.LinkedHashMap)1 TreeMap (java.util.TreeMap)1 Record (org.jooq.Record)1 SelectField (org.jooq.SelectField)1 Annotation (zipkin2.Annotation)1 Call (zipkin2.Call)1 CheckResult (zipkin2.CheckResult)1 Endpoint (zipkin2.Endpoint)1 Aggregation (zipkin2.elasticsearch.internal.client.Aggregation)1 SearchRequest (zipkin2.elasticsearch.internal.client.SearchRequest)1