Search in sources :

Example 1 with TestTracing

use of com.palantir.tracing.TestTracing in project dialogue by palantir.

the class AbstractChannelTest method requestAreTraced.

@Test
@TestTracing(snapshot = true)
public void requestAreTraced() throws Exception {
    endpoint.method = HttpMethod.POST;
    ListenableFuture<Response> result = channel.execute(endpoint, request);
    RecordedRequest recorded = server.takeRequest();
    assertThat(recorded.getHeader("X-B3-TraceId")).isNotEmpty();
    assertThat(result.get().code()).isEqualTo(200);
}
Also used : MockResponse(okhttp3.mockwebserver.MockResponse) RecordedRequest(okhttp3.mockwebserver.RecordedRequest) TestTracing(com.palantir.tracing.TestTracing) Test(org.junit.jupiter.api.Test)

Aggregations

TestTracing (com.palantir.tracing.TestTracing)1 MockResponse (okhttp3.mockwebserver.MockResponse)1 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)1 Test (org.junit.jupiter.api.Test)1