You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2019/11/14 09:54:50 UTC
[tinkerpop] branch travis-fix updated: Give reconnect some extra
time on travis
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch travis-fix
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/travis-fix by this push:
new 15b88b8 Give reconnect some extra time on travis
15b88b8 is described below
commit 15b88b8efffc2737a95319d3ab732adacdfd065d
Author: stephen <sp...@gmail.com>
AuthorDate: Thu Nov 14 04:54:06 2019 -0500
Give reconnect some extra time on travis
---
.../gremlin/server/GremlinServerIntegrateTest.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index f25b170..0510328 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -1220,13 +1220,21 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
// restart server
this.startServer();
- // the retry interval is 1 second, wait a bit longer
- TimeUnit.SECONDS.sleep(5);
-
- List<Result> results = client.submit("1+1").all().join();
- assertEquals(1, results.size());
- assertEquals(2, results.get(0).getInt());
+ // try a bunch of times to reconnect. on slower systems this may simply take longer...looking at you travis
+ for (int ix = 1; ix < 11; ix++) {
+ // the retry interval is 1 second, wait a bit longer
+ TimeUnit.SECONDS.sleep(5);
+
+ try {
+ final List<Result> results = client.submit("1+1").all().join();
+ assertEquals(1, results.size());
+ assertEquals(2, results.get(0).getInt());
+ } catch (Exception ex) {
+ if (ix == 10)
+ fail("Should have eventually succeeded");
+ }
+ }
} finally {
cluster.close();
}