You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/01/29 09:09:34 UTC
[incubator-servicecomb-java-chassis] branch master updated: SCB-293
sleep before quering in tracing test
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 7dcec5a SCB-293 sleep before quering in tracing test
7dcec5a is described below
commit 7dcec5ae8ea7a473a03ce18dec3872918f3ca185
Author: Yang Bo <ya...@huawei.com>
AuthorDate: Fri Jan 26 17:43:58 2018 +0800
SCB-293 sleep before quering in tracing test
The zipkin reporter is asynchronous, and there is no gurarantee when
the metrics will be reported to the server. Just sleep for 5 seconds
before quering should be enough for our simple test case scenario.
---
.../org/apache/servicecomb/tests/tracing/TracingTestBase.java | 9 +++++++++
1 file changed, 9 insertions(+)
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 3a925b3..4524025 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 @@ public class TracingTestBase {
.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));
--
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.