Repository: tinkerpop
Updated Branches:
  refs/heads/master f4b4d867a -> 5df1ce77a


Shutdown server in test to try to ensure log flush for assertion

Tests that check logs for assertions tend to randomly fail despite a number of 
attempt to try to harden them. In this attempt I shutdown the server prior to 
log assertion in the hopes that it will flush everything through and prevent 
failures. CTR


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

Branch: refs/heads/master
Commit: 4705c0416d522cce4d8c6ec498215f7f446fee4d
Parents: 1daf3f1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Apr 20 10:56:34 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Apr 20 10:56:34 2018 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/server/GremlinServerIntegrateTest.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4705c041/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 6454ad5..a1689e9 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
@@ -327,9 +327,12 @@ public class GremlinServerIntegrateTest extends 
AbstractGremlinServerIntegration
         // there record
         Thread.sleep(3000);
 
-        assertThat(recordingAppender.logContainsAny(".*Checking channel - 
sending ping to client after idle period of .*$"), is(true));
-
         client.close();
+
+        // stop the server to be sure that logs flush
+        stopServer();
+
+        assertThat(recordingAppender.logContainsAny(".*Checking channel - 
sending ping to client after idle period of .*$"), is(true));
     }
 
     @Test

Reply via email to