You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/06/05 20:46:36 UTC

[06/26] incubator-tinkerpop git commit: Add integration tests for validating SSL operability in Gremlin Server.

Add integration tests for validating SSL operability in Gremlin Server.


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

Branch: refs/heads/preprocessor
Commit: 4a507ccf8a1d00e71e0c872ff73927bf97e60984
Parents: b9da75c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jun 4 08:36:29 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jun 4 08:36:29 2015 -0400

----------------------------------------------------------------------
 .../gremlin/server/GremlinServerIntegrateTest.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4a507ccf/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 186fa0a..e1c47ee 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
@@ -107,6 +107,10 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             case "shouldWorkOverNioTransport":
                 settings.channelizer = NioChannelizer.class.getName();
                 break;
+            case "shouldEnableSsl":
+                settings.ssl = new Settings.SslSettings();
+                settings.ssl.enabled = true;
+                break;
             case "shouldHaveTheSessionTimeout":
                 settings.processors.clear();
                 final Settings.ProcessorSettings processorSettings = new Settings.ProcessorSettings();
@@ -121,6 +125,19 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
     }
 
     @Test
+    public void shouldEnableSsl() {
+        final Cluster cluster = Cluster.build().enableSsl(true).create();
+        final Client client = cluster.connect();
+
+        try {
+            // this should return "nothing" - there should be no exception
+            assertEquals("test", client.submit("'test'").one().getString());
+        } finally {
+            cluster.close();
+        }
+    }
+
+    @Test
     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