Merge branch 'tp32' into tp33
Conflicts:
gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9ccefce
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9ccefce
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9ccefce
Branch: refs/heads/TINKERPOP-2053
Commit: d9ccefcea9274f00e7339b840624286e198d7832
Parents: 86b1be5 4bdb006
Author: Stephen Mallette
Authored: Fri Oct 5 06:57:09 2018 -0400
Committer: Stephen Mallette
Committed: Fri Oct 5 06:57:09 2018 -0400
--
.../groovy/jsr223/GremlinGroovyScriptEngineTest.java | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9ccefce/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
--
diff --cc
gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
index 3e1d153,2803c24..83ac13d
---
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
+++
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
@@@ -22,13 -22,16 +22,9 @@@ import groovy.lang.Closure
import groovy.lang.MissingPropertyException;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
-import org.apache.tinkerpop.gremlin.groovy.CompilerCustomizerProvider;
-import org.apache.tinkerpop.gremlin.groovy.NoImportCustomizerProvider;
-import
org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.InterpreterModeCustomizerProvider;
--import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.util.function.Lambda;
--import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import org.javatuples.Pair;
import org.junit.Test;
--import org.slf4j.Logger;
--import org.slf4j.LoggerFactory;
import javax.script.Bindings;
import javax.script.ScriptContext;
@@@ -61,8 -73,8 +57,6 @@@ import static org.junit.Assert.fail
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
public class GremlinGroovyScriptEngineTest {
--private static final Logger logger =
LoggerFactory.getLogger(GremlinGroovyScriptEngineTest.class);
--
private static final Object[] EMPTY_ARGS = new Object[0];
@Test
@@@ -162,8 -220,78 +156,7 @@@
engine.eval("assert 1==0");
}
-
@Test
-public void shouldLoadImportsViaDependencyManagerInterface() throws
Exception {
-final GremlinGroovyScriptEngine engine = new
GremlinGroovyScriptEngine((CompilerCustomizerProvider)
NoImportCustomizerProvider.INSTANCE);
-try {
-engine.eval("Vertex.class.getName()");
-fail("Should have thrown an exception because no imports were
supplied");
-} catch (Exception se) {
-assertTrue(se instanceof ScriptException);
-}
-
-engine.addImports(new HashSet<>(Arrays.asList("import
org.apache.tinkerpop.gremlin.structure.Vertex")));
-assertEquals(Vertex.class.getName(),
engine.eval("Vertex.class.getName()"));
-}
-
-@Test
-public void shouldLoadImportsViaDependencyManagerInterfaceAdditively()
throws Exception {
-final GremlinGroovyScriptEngine engine = new
GremlinGroovyScriptEngine((CompilerCustomizerProvider)
NoImportCustomizerProvider.INSTANCE);
-try {
-engine.eval("Vertex.class.getName()");
-fail("Should have thrown an exception because no imports were
supplied");
-} catch (Exception se) {
-assertTrue(se instanceof ScriptException);
-}
-
-try {
-engine.eval("StreamFactory.class.getName()");
-fail("Should have thrown an exception because no imports were
supplied");
-} catch (Exception se) {
-assertTrue(se instanceof ScriptException);
-}
-
-engine.addImports(new HashSet<>(Arrays.asList("import " +
Vertex.class.getCanonicalName(;
-assertEquals(Vertex.class.getName(),
engine.eval("Vertex.class.getName()"));
-
-try {
-engine.eval("IteratorUtils.class.getName()");
-fail("Should have thrown an exception because no imports were
supplied");
-} catch (Exception se) {
-assertTrue(se instanceof ScriptException);
-}
-
-engine.addImports(new HashSet<>(Arrays.asList("import " +
IteratorUtils.class.getCanonicalName(;
-assertEquals(Vertex.class.getN