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 2016/11/03 11:57:59 UTC
[10/12] tinkerpop git commit: Fixed a minor race condition in server
session tests
Fixed a minor race condition in server session tests
This fix was made on TINKERPOP-1434 but that hasn't merged yet and tests seem to be failing in a more prevalent fashion now and the fix is necessary. CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/49b49e27
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/49b49e27
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/49b49e27
Branch: refs/heads/TINKERPOP-1434
Commit: 49b49e2787360ed86973f7674194447657191593
Parents: 9096274
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Nov 3 07:23:25 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Nov 3 07:25:47 2016 -0400
----------------------------------------------------------------------
.../gremlin/server/GremlinServerSessionIntegrateTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/49b49e27/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
index c384742..25c890b 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSessionIntegrateTest.java
@@ -144,7 +144,8 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt
cluster2.close();
// triggered an error during close and since we didn't force close, the attempt to close the transaction
- // is made
+ // is made - pause for a moment to be sure the logger gets a chance to propagate to the recordingAppender
+ Thread.sleep(1000);
assertThat(recordingAppender.getMessages(), hasItem("INFO - Rolling back open transactions on graph before killing session: " + name.getMethodName() + "\n"));
}
@@ -171,7 +172,9 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt
client2.close();
- // because the close was forced, the message should appear immediately
+ // because the close was forced, the message should appear immediately but pause for a second to be
+ // sure it propagates to the recordingAppender
+ Thread.sleep(1000);
assertThat(recordingAppender.getMessages(), hasItem("INFO - Skipped attempt to close open graph transactions on " + name.getMethodName() + " - close was forced\n"));
try {