Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1538 [created] 569753e3b
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/569753e3/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 0f0cdae..5ff3adf 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 @@ -38,7 +38,6 @@ import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode; import org.apache.tinkerpop.gremlin.driver.ser.Serializers; import org.apache.tinkerpop.gremlin.driver.simple.NioClient; import org.apache.tinkerpop.gremlin.driver.simple.SimpleClient; -import org.apache.tinkerpop.gremlin.driver.simple.WebSocketClient; import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine; import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompileStaticCustomizerProvider; import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.InterpreterModeCustomizerProvider; @@ -137,7 +136,10 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration settings.ssl.overrideSslContext(createServerSslContext()); break; case "shouldStartWithDefaultSettings": - return new Settings(); + // test with defaults exception for port because we want to keep testing off of 8182 + final Settings defaultSettings = new Settings(); + defaultSettings.port = TestClientFactory.PORT; + return settings; case "shouldHaveTheSessionTimeout": settings.processors.clear(); final Settings.ProcessorSettings processorSettings = new Settings.ProcessorSettings(); @@ -207,7 +209,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldUseInterpreterMode() throws Exception { - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(name.getMethodName()); client.submit("def subtractAway(x,y){x-y};[]").all().get(); @@ -229,7 +231,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldNotUseInterpreterMode() throws Exception { - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(name.getMethodName()); client.submit("def subtractAway(x,y){x-y};[]").all().get(); @@ -251,7 +253,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldUseSimpleSandbox() throws Exception { - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(); assertEquals(2, client.submit("1+1").all().get().get(0).getInt()); @@ -271,7 +273,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration public void shouldStartWithDefaultSettings() { // just quickly validate that results are returning given defaults. no graphs are config'd with defaults // so just eval a groovy script. - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(); final ResultSet results = client.submit("[1,2,3,4,5,6,7,8,9]"); @@ -283,7 +285,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldEnableSsl() { - final Cluster cluster = Cluster.build().enableSsl(true).create(); + final Cluster cluster = TestClientFactory.build().enableSsl(true).create(); final Client client = cluster.connect(); try { @@ -301,7 +303,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration builder.trustManager(InsecureTrustManagerFactory.INSTANCE); builder.sslProvider(SslProvider.JDK); - final Cluster cluster = Cluster.build().enableSsl(true).sslContext(builder.build()).create(); + final Cluster cluster = TestClientFactory.build().enableSsl(true).sslContext(builder.build()).create(); final Client client = cluster.connect(); try { @@ -314,7 +316,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldEnableSslButFailIfClientConnectsWithoutIt() { - final Cluster cluster = Cluster.build().enableSsl(false).create(); + final Cluster cluster = TestClientFactory.build().enableSsl(false).create(); final Client client = cluster.connect(); try { @@ -336,7 +338,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration assumeThat("Set the 'assertNonDeterministic' property to true to execute this test", System.getProperty("assertNonDeterministic"), is("true")); - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(); try { @@ -382,7 +384,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReturnInvalidRequestArgsWhenGremlinArgIsNotSupplied() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL).create(); final ResponseMessage result = client.submit(request).get(0); assertThat(result.getStatus().getCode(), is(not(ResponseStatusCode.PARTIAL_CONTENT))); @@ -392,7 +394,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReturnInvalidRequestArgsWhenInvalidReservedBindingKeyIsUsed() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final Map<String, Object> bindings = new HashMap<>(); bindings.put(T.id.getAccessor(), "123"); final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) @@ -412,7 +414,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration assertTrue(pass.get()); } - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final Map<String, Object> bindings = new HashMap<>(); bindings.put("id", "123"); final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) @@ -435,7 +437,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReturnInvalidRequestArgsWhenInvalidTypeBindingKeyIsUsed() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final Map<Object, Object> bindings = new HashMap<>(); bindings.put(1, "123"); final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) @@ -458,7 +460,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReturnInvalidRequestArgsWhenInvalidNullBindingKeyIsUsed() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final Map<String, Object> bindings = new HashMap<>(); bindings.put(null, "123"); final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) @@ -482,7 +484,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldBatchResultsByTwos() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) .addArg(Tokens.ARGS_GREMLIN, "[0,1,2,3,4,5,6,7,8,9]").create(); @@ -504,7 +506,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldBatchResultsByOnesByOverridingFromClientSide() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) .addArg(Tokens.ARGS_GREMLIN, "[0,1,2,3,4,5,6,7,8,9]") .addArg(Tokens.ARGS_BATCH_SIZE, 1).create(); @@ -518,7 +520,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldWorkOverNioTransport() throws Exception { - try (SimpleClient client = new NioClient()) { + try (SimpleClient client = TestClientFactory.createNioClient()) { final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) .addArg(Tokens.ARGS_GREMLIN, "[0,1,2,3,4,5,6,7,8,9,]").create(); @@ -531,7 +533,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldNotThrowNoSuchElementException() throws Exception { - try (SimpleClient client = new WebSocketClient()){ + try (SimpleClient client = TestClientFactory.createWebSocketClient()){ // this should return "nothing" - there should be no exception final List<ResponseMessage> responses = client.submit("g.V().has('name','kadfjaldjfla')"); assertNull(responses.get(0).getResult().getData()); @@ -541,7 +543,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldReceiveFailureTimeOutOnScriptEval() throws Exception { - try (SimpleClient client = new WebSocketClient()){ + try (SimpleClient client = TestClientFactory.createWebSocketClient()){ final List<ResponseMessage> responses = client.submit("Thread.sleep(3000);'some-stuff-that-should not return'"); assertThat(responses.get(0).getStatus().getMessage(), startsWith("Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 200 ms")); @@ -553,7 +555,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldReceiveFailureTimeOutOnScriptEvalUsingOverride() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage msg = RequestMessage.build("eval") .addArg(Tokens.ARGS_SCRIPT_EVAL_TIMEOUT, 100) .addArg(Tokens.ARGS_GREMLIN, "Thread.sleep(3000);'some-stuff-that-should not return'") @@ -568,7 +570,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReceiveFailureTimeOutOnScriptEvalOfOutOfControlLoop() throws Exception { - try (SimpleClient client = new WebSocketClient()){ + try (SimpleClient client = TestClientFactory.createWebSocketClient()){ // timeout configured for 1 second so the timed interrupt should trigger prior to the // scriptEvaluationTimeout which is at 30 seconds by default final List<ResponseMessage> responses = client.submit("while(true){}"); @@ -582,7 +584,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldReceiveFailureTimeOutOnTotalSerialization() throws Exception { - try (SimpleClient client = new WebSocketClient()){ + try (SimpleClient client = TestClientFactory.createWebSocketClient()){ final List<ResponseMessage> responses = client.submit("(0..<100000)"); // the last message should contain the error @@ -596,14 +598,14 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test @SuppressWarnings("unchecked") public void shouldLoadInitScript() throws Exception { - try (SimpleClient client = new WebSocketClient()){ + try (SimpleClient client = TestClientFactory.createWebSocketClient()){ assertEquals(2, ((List<Integer>) client.submit("addItUp(1,1)").get(0).getResult().getData()).get(0).intValue()); } } @Test public void shouldGarbageCollectPhantomButNotHard() throws Exception { - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(); assertEquals(2, client.submit("addItUp(1,1)").all().join().get(0).getInt()); @@ -626,7 +628,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReceiveFailureOnBadGraphSONSerialization() throws Exception { - final Cluster cluster = Cluster.build("localhost").serializer(Serializers.GRAPHSON_V1D0).create(); + final Cluster cluster = TestClientFactory.build().serializer(Serializers.GRAPHSON_V1D0).create(); final Client client = cluster.connect(); try { @@ -645,7 +647,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldReceiveFailureOnBadGryoSerialization() throws Exception { - final Cluster cluster = Cluster.build("localhost").serializer(Serializers.GRYO_V1D0).create(); + final Cluster cluster = TestClientFactory.build().serializer(Serializers.GRYO_V1D0).create(); final Client client = cluster.connect(); try { @@ -665,7 +667,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @SuppressWarnings("ThrowableResultOfMethodCallIgnored") @Test public void shouldBlockRequestWhenTooBig() throws Exception { - final Cluster cluster = Cluster.open(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(); try { @@ -692,7 +694,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldFailOnDeadHost() throws Exception { - final Cluster cluster = Cluster.build("localhost").create(); + final Cluster cluster = TestClientFactory.build().create(); final Client client = cluster.connect(); // ensure that connection to server is good @@ -728,7 +730,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldNotHavePartialContentWithOneResult() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) .addArg(Tokens.ARGS_GREMLIN, "10").create(); final List<ResponseMessage> responses = client.submit(request); @@ -739,7 +741,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @Test public void shouldFailWithBadScriptEval() throws Exception { - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) .addArg(Tokens.ARGS_GREMLIN, "new String().doNothingAtAllBecauseThis is a syntax error").create(); final List<ResponseMessage> responses = client.submit(request); @@ -752,7 +754,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration @SuppressWarnings("unchecked") public void shouldStillSupportDeprecatedRebindingsParameterOnServer() throws Exception { // this test can be removed when the rebindings arg is removed - try (SimpleClient client = new WebSocketClient()) { + try (SimpleClient client = TestClientFactory.createWebSocketClient()) { final Map<String,String> rebindings = new HashMap<>(); rebindings.put("xyz", "graph"); final RequestMessage request = RequestMessage.build(Tokens.OPS_EVAL) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/569753e3/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 3c1fef9..1c27c51 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 @@ -31,7 +31,6 @@ import org.apache.tinkerpop.gremlin.driver.message.RequestMessage; import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage; import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode; import org.apache.tinkerpop.gremlin.driver.simple.SimpleClient; -import org.apache.tinkerpop.gremlin.driver.simple.WebSocketClient; import org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor; import org.apache.tinkerpop.gremlin.util.Log4jRecordingAppender; import org.junit.After; @@ -114,10 +113,10 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt // basically, we need one to submit the long run job and one to do the close operation that will cancel the // long run job. it is probably possible to do this with some low-level message manipulation but that's // probably not necessary - final Cluster cluster1 = Cluster.build().create(); + final Cluster cluster1 = TestClientFactory.open(); final Client client1 = cluster1.connect(name.getMethodName()); client1.submit("1+1").all().join(); - final Cluster cluster2 = Cluster.build().create(); + final Cluster cluster2 = TestClientFactory.open(); final Client client2 = cluster2.connect(name.getMethodName()); client2.submit("1+1").all().join(); @@ -144,7 +143,7 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt public void shouldRollbackOnEvalExceptionForManagedTransaction() throws Exception { assumeNeo4jIsPresent(); - final Cluster cluster = Cluster.build().create(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(name.getMethodName(), true); try { @@ -165,7 +164,7 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt @Test public void shouldCloseSessionOnceOnRequest() throws Exception { - final Cluster cluster = Cluster.build().create(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(name.getMethodName()); final ResultSet results1 = client.submit("x = [1,2,3,4,5,6,7,8,9]"); @@ -199,7 +198,7 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt @Test public void shouldHaveTheSessionTimeout() throws Exception { - final Cluster cluster = Cluster.build().create(); + final Cluster cluster = TestClientFactory.open(); final Client client = cluster.connect(name.getMethodName()); final ResultSet results1 = client.submit("x = [1,2,3,4,5,6,7,8,9]"); @@ -235,7 +234,7 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt @Test public void shouldEnsureSessionBindingsAreThreadSafe() throws Exception { - final Cluster cluster = Cluster.build().minInProcessPerConnection(16).maxInProcessPerConnection(64).create(); + final Cluster cluster = TestClientFactory.build().minInProcessPerConnection(16).maxInProcessPerConnection(64).create(); final Client client = cluster.connect(name.getMethodName()); client.submitAsync("a=100;b=1000;c=10000;null"); @@ -268,7 +267,7 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt public void shouldExecuteInSessionAndSessionlessWithoutOpeningTransactionWithSingleClient() throws Exception { assumeNeo4jIsPresent(); - try (final SimpleClient client = new WebSocketClient()) { + try (final SimpleClient client = TestClientFactory.createWebSocketClient()) { //open a transaction, create a vertex, commit final RequestMessage openRequest = RequestMessage.build(Tokens.OPS_EVAL) @@ -335,7 +334,7 @@ public class GremlinServerSessionIntegrateTest extends AbstractGremlinServerInt public void shouldExecuteInSessionWithTransactionManagement() throws Exception { assumeNeo4jIsPresent(); - try (final SimpleClient client = new WebSocketClient()) { + try (final SimpleClient client = TestClientFactory.createWebSocketClient()) { final RequestMessage addRequest = RequestMessage.build(Tokens.OPS_EVAL) .processor("session") .addArg(Tokens.ARGS_SESSION, name.getMethodName()) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/569753e3/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java ---------------------------------------------------------------------- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java index 27e3d39..0c1ed0b 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinTraversalPerformanceTest.java @@ -56,7 +56,7 @@ public class GremlinTraversalPerformanceTest extends AbstractGremlinServerPerfor public final static int DEFAULT_CONCURRENT_BENCHMARK_ROUNDS = 500; public final static int DEFAULT_CONCURRENT_WARMUP_ROUNDS = 10; - private final static Cluster cluster = Cluster.build("localhost").maxConnectionPoolSize(32).maxWaitForConnection(30000).create(); + private final static Cluster cluster = TestClientFactory.build().maxConnectionPoolSize(32).maxWaitForConnection(30000).create(); private final static AtomicReference<Client> client = new AtomicReference<>(); @Rule http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/569753e3/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/TestClientFactory.java ---------------------------------------------------------------------- diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/TestClientFactory.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/TestClientFactory.java new file mode 100644 index 0000000..bfbb40b --- /dev/null +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/TestClientFactory.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.server; + +import org.apache.tinkerpop.gremlin.driver.Cluster; +import org.apache.tinkerpop.gremlin.driver.simple.NioClient; +import org.apache.tinkerpop.gremlin.driver.simple.WebSocketClient; + +import java.net.URI; + +/** + * @author Stephen Mallette (http://stephen.genoprime.com) + */ +public final class TestClientFactory { + + public static final int PORT = 45940; + public static final URI WEBSOCKET_URI = URI.create("ws://localhost:" + PORT); + public static final URI NIO_URI = URI.create("gs://localhost:" + PORT); + public static final String HTTP = "http://localhost:" + PORT; + + public static Cluster.Builder build() { + return Cluster.build("localhost").port(45940); + } + + public static Cluster open() { + return build().create(); + } + + public static WebSocketClient createWebSocketClient() { + return new WebSocketClient(WEBSOCKET_URI); + } + + public static NioClient createNioClient() { + return new NioClient(NIO_URI); + } + + public static String createURLString() { + return createURLString(""); + } + + public static String createURLString(final String suffix) { + return HTTP + suffix; + } +} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/569753e3/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml ---------------------------------------------------------------------- diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml index 88c95b7..cee377d 100644 --- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml +++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml @@ -16,7 +16,7 @@ # under the License. host: localhost -port: 8182 +port: 45940 threadPoolWorker: 1 gremlinPool: 8 scriptEvaluationTimeout: 30000 http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/569753e3/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml ---------------------------------------------------------------------- diff --git a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml index ed7444c..03be730 100644 --- a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml +++ b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-performance.yaml @@ -16,7 +16,7 @@ # under the License. host: localhost -port: 8182 +port: 45940 threadPoolWorker: 1 gremlinPool: 8 scriptEvaluationTimeout: 30000
