Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1352 e66f2c983 -> e14183c65
Increased settings on Cluster creation in test. The test uses a fair degree of parallelism and now that other bug fixes went into play the pool wasn't growing out of bounds as it was before in some cases, which meant that the Cluster in the test had to wait longer for connections which ultimately led to timeouts. By increasing the number of in-process requests and increasing pool sizes, the test seems to now pass more consistently. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e14183c6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e14183c6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e14183c6 Branch: refs/heads/TINKERPOP-1352 Commit: e14183c65c5d673b23f10a556de48220b2927bf5 Parents: e66f2c9 Author: Stephen Mallette <[email protected]> Authored: Thu Jun 30 19:50:44 2016 -0400 Committer: Stephen Mallette <[email protected]> Committed: Thu Jun 30 19:50:44 2016 -0400 ---------------------------------------------------------------------- .../gremlin/server/GremlinDriverIntegrateTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e14183c6/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 8515e8a..a7cbeee 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 @@ -969,7 +969,11 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldBeThreadSafeToUseOneClient() throws Exception { - final Cluster cluster = Cluster.build().create(); + final Cluster cluster = Cluster.build().workerPoolSize(2) + .maxInProcessPerConnection(64) + .minInProcessPerConnection(32) + .maxConnectionPoolSize(16) + .minConnectionPoolSize(8).create(); final Client client = cluster.connect(); final Map<Integer, Integer> results = new ConcurrentHashMap<>(); @@ -991,8 +995,11 @@ public class GremlinDriverIntegrateTest extends AbstractGremlinServerIntegration threads.forEach(FunctionUtils.wrapConsumer(Thread::join)); for (int ix = 0; ix < results.size(); ix++) { + assertThat(results.containsKey(ix), is(true)); assertEquals(1000 + ix, results.get(ix).intValue()); } + + cluster.close(); } @Test
