Skip to content

Commit e434cc2

Browse files
authored
Add wait for spans in apacheAyncHttpClientTest (#254)
1 parent 4d035c8 commit e434cc2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

instrumentation/apache-httpasyncclient-4.1/src/test/java/io/opentelemetry/instrumentation/hypertrace/apachehttpasyncclient/ApacheAsyncClientInstrumentationModuleTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public void getJson()
8484
Assertions.assertEquals(GetJsonHandler.RESPONSE_BODY, responseBody);
8585

8686
TEST_WRITER.waitForTraces(1);
87+
// TODO : It needs some time to create second span for responseBody
88+
TEST_WRITER.waitForSpans(2);
8789
List<List<SpanData>> traces = TEST_WRITER.getTraces();
8890
Assertions.assertEquals(1, traces.size());
8991
Assertions.assertEquals(2, traces.get(0).size());

0 commit comments

Comments
 (0)