tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [11/15] tinkerpop git commit: TINKERPOP-1612 Configure tests to allow them to pass under new plugins
Date Thu, 26 Jan 2017 19:57:44 GMT
TINKERPOP-1612 Configure tests to allow them to pass under new plugins


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

Branch: refs/heads/TINKERPOP-1612-wip
Commit: 2bfe41f4cfbfaf7280ca68d6420c394f968a4975
Parents: a5f528a
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Wed Jan 25 06:52:10 2017 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Jan 26 14:55:45 2017 -0500

----------------------------------------------------------------------
 .../gremlin/groovy/engine/GremlinExecutor.java      |  4 +---
 .../gremlin/server/GremlinServerIntegrateTest.java  | 16 +++++-----------
 2 files changed, 6 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2bfe41f4/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
index 8fdb86e..80e72fd 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
@@ -128,10 +128,8 @@ public class GremlinExecutor implements AutoCloseable {
         // deprecated code around this is removed.
         if (!useGremlinScriptEngineManager)
             this.scriptEngines = createScriptEngines();
-        else {
+        else
             this.scriptEngines = null;
-            gremlinScriptEngineManager.getEngineByName("gremlin-groovy");
-        }
 
         this.suppliedExecutor = suppliedExecutor;
         this.suppliedScheduledExecutor = suppliedScheduledExecutor;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2bfe41f4/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 3792022..766ebf3 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
@@ -42,8 +42,8 @@ import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
 import org.apache.tinkerpop.gremlin.driver.simple.SimpleClient;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin;
-import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ConfigurationCustomizerProvider;
 import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.SimpleSandboxExtension;
+import org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin;
 import org.apache.tinkerpop.gremlin.process.remote.RemoteGraph;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
@@ -64,7 +64,6 @@ import org.junit.Test;
 import java.lang.reflect.Field;
 import java.nio.channels.ClosedChannelException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -76,7 +75,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.Function;
 import java.util.function.Supplier;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
@@ -93,7 +91,6 @@ import static org.hamcrest.core.StringStartsWith.startsWith;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeThat;
 import static org.junit.Assert.assertEquals;
 
 /**
@@ -170,6 +167,8 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
                 return settings;
             case "shouldUseSimpleSandbox":
                 settings.scriptEngines.get("gremlin-groovy").plugins.put(GroovyCompilerGremlinPlugin.class.getName(),
getScriptEngineConfForSimpleSandbox());
+                // remove the script because it isn't used in the test but also because it's
not CompileStatic ready
+                settings.scriptEngines.get("gremlin-groovy").plugins.remove(ScriptFileGremlinPlugin.class.getName());
                 break;
             case "shouldUseInterpreterMode":
                 settings.scriptEngines.get("gremlin-groovy").plugins.put(GroovyCompilerGremlinPlugin.class.getName(),
getScriptEngineConfForInterpreterMode());
@@ -178,6 +177,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
                 settings.scriptEngines.get("gremlin-groovy").plugins.put(GroovyCompilerGremlinPlugin.class.getName(),
getScriptEngineConfForTimedInterrupt());
                 break;
             case "shouldUseBaseScript":
+                settings.scriptEngines.get("gremlin-groovy").plugins.put(GroovyCompilerGremlinPlugin.class.getName(),
getScriptEngineConfForBaseScript());
                 settings.scriptEngines.get("gremlin-groovy").config = getScriptEngineConfForBaseScript();
                 break;
         }
@@ -218,15 +218,9 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
 
     private static Map<String, Object> getScriptEngineConfForBaseScript() {
         final Map<String,Object> scriptEngineConf = new HashMap<>();
-        final Map<String,Object> compilerCustomizerProviderConf = new HashMap<>();
-        final List<Object> keyValues = new ArrayList<>();
-
         final Map<String,Object> properties = new HashMap<>();
         properties.put("ScriptBaseClass", BaseScriptForTesting.class.getName());
-        keyValues.add(properties);
-
-        compilerCustomizerProviderConf.put(ConfigurationCustomizerProvider.class.getName(),
keyValues);
-        scriptEngineConf.put("compilerCustomizerProviders", compilerCustomizerProviderConf);
+        scriptEngineConf.put("compilerConfigurationOptions", properties);
         return scriptEngineConf;
     }
 


Mime
View raw message