This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 32109d8 Ignored travis test that fails with test client
32109d8 is described below
commit 32109d87e3de8a13087e1026f02f0e8b034692a2
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Apr 30 11:53:48 2021 -0400
Ignored travis test that fails with test client
Added a second test that batches by 2 like the test client but uses the
actual driver. This may be a duplicate of testing elsewhere but this uses the
server side setting for the batch so in that sense it's a likely a bit
different. CTR
---
.../gremlin/server/GremlinServerIntegrateTest.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
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 42fd78a..7c231d8 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
@@ -62,6 +62,7 @@ import org.junit.Test;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -179,6 +180,7 @@ public class GremlinServerIntegrateTest extends
AbstractGremlinServerIntegration
settings.maxContentLength = 1024;
break;
case "shouldBatchResultsByTwos":
+ case "shouldBatchResultsByTwosToDriver":
settings.resultIterationBatchSize = 2;
break;
case "shouldUseSimpleSandbox":
@@ -713,6 +715,9 @@ public class GremlinServerIntegrateTest extends
AbstractGremlinServerIntegration
@Test
@SuppressWarnings("unchecked")
public void shouldBatchResultsByTwos() throws Exception {
+ // this test will not work quite right on UnifiedChannelizer, but
seems to only be a problem in Travis
+ assumeThat("Must use OpProcessor", isUsingUnifiedChannelizer(),
is(false));
+
try (SimpleClient client = TestClientFactory.createWebSocketClient()) {
final RequestMessage request =
RequestMessage.build(Tokens.OPS_EVAL)
.addArg(Tokens.ARGS_GREMLIN,
"[0,1,2,3,4,5,6,7,8,9]").create();
@@ -733,6 +738,21 @@ public class GremlinServerIntegrateTest extends
AbstractGremlinServerIntegration
}
@Test
+ public void shouldBatchResultsByTwosWithDriver() throws Exception {
+ final Cluster cluster = TestClientFactory.build().create();
+ final Client client = cluster.connect();
+
+ try {
+ final List<Result> results =
client.submit("[0,1,2,3,4,5,6,7,8,9]").all().join();
+ for (int ix = 0; ix < results.size(); ix++) {
+ assertEquals(ix, results.get(ix).getInt());
+ }
+ } finally {
+ cluster.close();
+ }
+ }
+
+ @Test
@SuppressWarnings("unchecked")
public void shouldBatchResultsByOnesByOverridingFromClientSide() throws
Exception {
try (SimpleClient client = TestClientFactory.createWebSocketClient()) {