Skip to content

Commit 73dca92

Browse files
committed
validate the response
1 parent c53cb0a commit 73dca92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

brave/brave6/src/test/java/com/linecorp/armeria/it/brave/BraveIntegrationTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import com.linecorp.armeria.client.WebClient;
5959
import com.linecorp.armeria.client.brave.BraveClient;
6060
import com.linecorp.armeria.client.thrift.ThriftClients;
61+
import com.linecorp.armeria.common.AggregatedHttpResponse;
6162
import com.linecorp.armeria.common.HttpRequest;
6263
import com.linecorp.armeria.common.HttpResponse;
6364
import com.linecorp.armeria.common.HttpStatus;
@@ -137,7 +138,7 @@ protected void configure(ServerBuilder sb) throws Exception {
137138
protected HttpResponse doGet(ServiceRequestContext ctx, HttpRequest req)
138139
throws Exception {
139140
final ListeningExecutorService executorService = MoreExecutors.listeningDecorator(
140-
Executors.newFixedThreadPool(2));
141+
ctx.makeContextAware(Executors.newFixedThreadPool(2)));
141142
final CountDownLatch countDownLatch = new CountDownLatch(2);
142143

143144
final ListenableFuture<List<Object>> spanAware = allAsList(IntStream.range(1, 3).mapToObj(
@@ -444,7 +445,8 @@ void testServiceInitiatedTrace(String type) throws Exception {
444445

445446
@Test
446447
void testSpanInThreadPoolHasSameTraceId() throws Exception {
447-
server.webClient().get("pool").aggregate().get();
448+
final AggregatedHttpResponse res = server.blockingWebClient().get("pool");
449+
assertThat(res.contentUtf8()).isEqualTo("Lee");
448450
await().untilAsserted(() -> assertThat(spanHandler.spans).hasSize(5));
449451
final MutableSpan[] spans = spanHandler.take(5);
450452
assertThat(Arrays.stream(spans).map(MutableSpan::traceId).collect(toImmutableSet())).hasSize(1);

0 commit comments

Comments
 (0)