WillemJiang closed pull request #534: SCB-293 sleep before quering in tracing
test
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/534
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
b/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
index 3a925b3a5..4524025cf 100644
---
a/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
+++
b/integration-tests/test-common/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestBase.java
@@ -75,6 +75,15 @@ protected void
assertThatSpansReceivedByZipkin(Collection<String> logs, String..
.map(this::extractIds)
.collect(Collectors.toList());
+ // Sleep for 5 seconds to wait the reporter finish posting to zipkin
server.
+ // See SCB-293
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ log.error("Thread interrupted, ", e.getMessage());
+ Thread.currentThread().interrupt();
+ }
+
String url = zipkin.httpUrl() + "/api/v2/trace/{traceId}";
log.info("rest url:" + url);
ResponseEntity<String> responseEntity = restTemplate.getForEntity(url,
String.class, traceId(loggedIds));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services