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 2017/05/16 13:13:28 UTC

tinkerpop git commit: Fixed assertion related to environmental configuration options

Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 b755788c6 -> 2dbaaa126


Fixed assertion related to environmental configuration options


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

Branch: refs/heads/tp32
Commit: 2dbaaa1268a01a2bbef9860fab83e34c8f1ba19f
Parents: b755788
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue May 16 08:27:21 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue May 16 08:52:04 2017 -0400

----------------------------------------------------------------------
 .../gremlin/server/GremlinServerAuthIntegrateTest.java         | 6 +++++-
 .../gremlin/server/GremlinServerAuthOldIntegrateTest.java      | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2dbaaa12/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
index 7eefa27..e06bbb7 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java
@@ -35,6 +35,8 @@ import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
 
 import static org.hamcrest.CoreMatchers.startsWith;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.AnyOf.anyOf;
+import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
@@ -128,7 +130,9 @@ public class GremlinServerAuthIntegrateTest extends AbstractGremlinServerIntegra
             fail("This should not succeed as the client did not provide credentials");
         } catch(Exception ex) {
             final Throwable root = ExceptionUtils.getRootCause(ex);
-            assertEquals(GSSException.class, root.getClass());
+
+            // depending on the configuration of the system environment you might get either of these
+            assertThat(root, anyOf(instanceOf(GSSException.class), instanceOf(ResponseException.class)));
         } finally {
             cluster.close();
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2dbaaa12/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthOldIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthOldIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthOldIntegrateTest.java
index 5a0fff7..b26dd1e 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthOldIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthOldIntegrateTest.java
@@ -34,6 +34,8 @@ import java.util.concurrent.TimeoutException;
 
 import static org.hamcrest.CoreMatchers.startsWith;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.AnyOf.anyOf;
+import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
@@ -131,7 +133,9 @@ public class GremlinServerAuthOldIntegrateTest extends AbstractGremlinServerInte
             fail("This should not succeed as the client did not provide credentials");
         } catch(Exception ex) {
             final Throwable root = ExceptionUtils.getRootCause(ex);
-            assertEquals(GSSException.class, root.getClass());
+
+            // depending on the configuration of the system environment you might get either of these
+            assertThat(root, anyOf(instanceOf(GSSException.class), instanceOf(ResponseException.class)));
         } finally {
             cluster.close();
         }