You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/06/21 06:48:10 UTC

[GitHub] [servicecomb-java-chassis] Shoothzj commented on a diff in pull request #3104: [SCB-2589] fix spans is null sometimes

Shoothzj commented on code in PR #3104:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3104#discussion_r902220333


##########
integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java:
##########
@@ -62,7 +62,11 @@ protected void assertThatSpansReceivedByZipkin(Collection<String> logs, String..
         .map(this::extractIds)
         .collect(Collectors.toList());
 
-    List<Span> spans = zipkin.getTrace(traceId(loggedIds));
+    List<Span> spans;
+    do {
+      spans = zipkin.getTrace(traceId(loggedIds));

Review Comment:
   we need to sleep in case of cpu 100%, also we need a reasonable timeout.
   Howerver, instead of write our impl, we can use https://github.com/awaitility/awaitility library
   ```
   Awaitility.await().atMost(10, SECONDS).until(() -> xxxxxx);
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org