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/06/29 23:12:30 UTC

[1/2] incubator-tinkerpop git commit: Adjusted the highwater test again in trying to get it pass consistently.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 2a0ddfb85 -> 8c658ce74


Adjusted the highwater test again in trying to get it pass consistently.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7a945cf0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7a945cf0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7a945cf0

Branch: refs/heads/master
Commit: 7a945cf01e4043f10f026e4ffb89ba8353d20e2f
Parents: 75ae7bd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jun 29 17:11:46 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Jun 29 17:11:46 2015 -0400

----------------------------------------------------------------------
 .../server/GremlinServerIntegrateTest.java      | 37 ++++++++++++--------
 1 file changed, 23 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7a945cf0/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
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 9a7607c..8e128b8 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
@@ -44,7 +44,6 @@ import org.junit.rules.TestName;
 
 import java.nio.channels.ClosedChannelException;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CountDownLatch;
@@ -157,36 +156,46 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     public void shouldRespectHighWaterMarkSettingAndSucceed() throws Exception {
         // the highwatermark should get exceeded on the server and thus pause the writes, but have no problem catching
         // itself up
-        try (SimpleClient client = new WebSocketClient()) {
-            final int resultCountToGenerate = 6000;
+        final Cluster cluster = Cluster.open();
+        final Client client = cluster.connect();
+
+        try {
+            final int resultCountToGenerate = 1000;
             final int batchSize = 3;
             final String fatty = IntStream.range(0, 175).mapToObj(String::valueOf).collect(Collectors.joining());
             final String fattyX = "['" + fatty + "'] * " + resultCountToGenerate;
 
             // don't allow the thread to proceed until all results are accounted for
-            final CountDownLatch latch = new CountDownLatch(resultCountToGenerate / batchSize);
+            final CountDownLatch latch = new CountDownLatch(resultCountToGenerate);
             final AtomicBoolean expected = new AtomicBoolean(false);
+            final AtomicBoolean faulty = new AtomicBoolean(false);
             final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL)
                     .addArg(Tokens.ARGS_BATCH_SIZE, batchSize)
                     .addArg(Tokens.ARGS_GREMLIN, fattyX).create();
-            client.submit(request, r -> {
-                try {
-                    if (r.getResult().getData() != null) {
-                        final List<Object> list = ((List<Object>) r.getResult().getData());
-                        final Object aFattyResult = list.get(0);
+
+            client.submitAsync(request).thenAcceptAsync(r -> {
+                r.stream().forEach(item -> {
+                    try {
+                        final String aFattyResult = item.getString();
                         expected.set(aFattyResult.equals(fatty));
+                    } catch (Exception ex) {
+                        ex.printStackTrace();
+                        faulty.set(true);
+                    } finally {
+                        latch.countDown();
                     }
-                } catch (Exception ex) {
-                    ex.printStackTrace();
-                } finally {
-                    latch.countDown();
-                }
+                });
             });
 
             assertTrue(latch.await(30000, TimeUnit.MILLISECONDS));
             assertEquals(0, latch.getCount());
+            assertFalse(faulty.get());
             assertTrue(expected.get());
             assertTrue(recordingAppender.getMessages().stream().anyMatch(m -> m.contains("Pausing response writing as writeBufferHighWaterMark exceeded on")));
+        } catch (Exception ex) {
+            fail("Shouldn't have tossed an exception");
+        } finally {
+            cluster.close();
         }
     }
 


[2/2] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/master'

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/8c658ce7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/8c658ce7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/8c658ce7

Branch: refs/heads/master
Commit: 8c658ce748018340d52695a6a0f2f1c5f4b57879
Parents: 7a945cf 2a0ddfb
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jun 29 17:12:23 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Jun 29 17:12:23 2015 -0400

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/Scoping.java | 13 ++++++------
 .../process/traversal/step/map/MatchStep.java   | 21 +++++++++++---------
 .../traversal/step/map/SelectOneStep.java       |  5 ++---
 .../process/traversal/step/map/SelectStep.java  |  9 ++++-----
 .../traversal/step/sideEffect/ProfileTest.java  |  2 --
 .../tinkergraph/structure/TinkerGraphTest.java  |  2 +-
 6 files changed, 25 insertions(+), 27 deletions(-)
----------------------------------------------------------------------