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 2015/09/04 18:20:07 UTC
[3/4] incubator-tinkerpop git commit: Improve gremlin driver tests.
Improve gremlin driver tests.
Ensure that availableHosts is tested before init() of the Client, after init() of the client and after the server goes down.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/8881caff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/8881caff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/8881caff
Branch: refs/heads/tp30
Commit: 8881caffe1cc6bab2682b4876047a3a85d83f209
Parents: 7351675
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 4 12:18:31 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 4 12:18:31 2015 -0400
----------------------------------------------------------------------
.../gremlin/server/GremlinDriverIntegrateTest.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/8881caff/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 407436c..326d746 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -332,7 +332,7 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
@Test
public void shouldCloseWithServerDown() throws Exception {
final Cluster cluster = Cluster.open();
- cluster.connect();
+ cluster.connect().init();
stopServer();
@@ -341,11 +341,14 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration
@Test
public void shouldMarkHostDeadSinceServerIsDown() throws Exception {
- stopServer();
-
final Cluster cluster = Cluster.open();
- cluster.connect();
+ assertEquals(0, cluster.availableHosts().size());
+ cluster.connect().init();
+ assertEquals(1, cluster.availableHosts().size());
+
+ stopServer();
+ cluster.connect().init();
assertEquals(0, cluster.availableHosts().size());
cluster.close();