use of org.apache.cxf.systest.microprofile.rest.client.tracing.BookRestClient in project cxf by apache.
the class BraveTracingTest method testThatNewSpanIsCreatedWhenNotProvided.
@Test
public void testThatNewSpanIsCreatedWhenNotProvided() {
final BookRestClient client = createRestClient();
assertThat(client.getBooks(), hasSize(2));
assertThat(TestSpanHandler.getAllSpans().size(), equalTo(3));
assertThat(TestSpanHandler.getAllSpans().get(0).name(), equalTo("get books"));
assertThat(TestSpanHandler.getAllSpans().get(1).name(), equalTo("GET /bookstore/books"));
assertThat(TestSpanHandler.getAllSpans().get(2).name(), equalTo("GET http://localhost:" + PORT + "/bookstore/books"));
}
use of org.apache.cxf.systest.microprofile.rest.client.tracing.BookRestClient in project cxf by apache.
the class BraveTracingTest method testThatNewSpanIsCreatedWhenNotProvidedWithAsyncConduit.
@Test
public void testThatNewSpanIsCreatedWhenNotProvidedWithAsyncConduit() {
final BookRestClient client = createAsyncRestClient();
assertThat(client.getBooks(), hasSize(2));
assertThat(TestSpanHandler.getAllSpans().size(), equalTo(3));
assertThat(TestSpanHandler.getAllSpans().get(0).name(), equalTo("get books"));
assertThat(TestSpanHandler.getAllSpans().get(1).name(), equalTo("GET /bookstore/books"));
assertThat(TestSpanHandler.getAllSpans().get(2).name(), equalTo("GET http://localhost:" + PORT + "/bookstore/books"));
}
use of org.apache.cxf.systest.microprofile.rest.client.tracing.BookRestClient in project cxf by apache.
the class BraveTracingTest method testThatNewInnerSpanIsCreatedWithAsyncConduit.
@Test
public void testThatNewInnerSpanIsCreatedWithAsyncConduit() {
final ScopedSpan span = brave.tracer().startScopedSpan("calling book service");
try {
final BookRestClient client = createAsyncRestClient();
assertThat(client.getBooks(), hasSize(2));
} finally {
span.finish();
}
assertThat(TestSpanHandler.getAllSpans().size(), equalTo(4));
assertThat(TestSpanHandler.getAllSpans().get(0).name(), equalTo("get books"));
assertThat(TestSpanHandler.getAllSpans().get(1).name(), equalTo("GET /bookstore/books"));
assertThat(TestSpanHandler.getAllSpans().get(2).name(), equalTo("GET http://localhost:" + PORT + "/bookstore/books"));
assertThat(TestSpanHandler.getAllSpans().get(3).name(), equalTo("calling book service"));
}
use of org.apache.cxf.systest.microprofile.rest.client.tracing.BookRestClient in project cxf by apache.
the class BraveTracingTest method testThatNewInnerSpanIsCreated.
@Test
public void testThatNewInnerSpanIsCreated() {
final ScopedSpan span = brave.tracer().startScopedSpan("calling book service");
try {
final BookRestClient client = createRestClient();
assertThat(client.getBooks(), hasSize(2));
} finally {
span.finish();
}
assertThat(TestSpanHandler.getAllSpans().size(), equalTo(4));
assertThat(TestSpanHandler.getAllSpans().get(0).name(), equalTo("get books"));
assertThat(TestSpanHandler.getAllSpans().get(1).name(), equalTo("GET /bookstore/books"));
assertThat(TestSpanHandler.getAllSpans().get(2).name(), equalTo("GET http://localhost:" + PORT + "/bookstore/books"));
assertThat(TestSpanHandler.getAllSpans().get(3).name(), equalTo("calling book service"));
}
Aggregations