Github user robertdale commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/570#discussion_r105959185
--- Diff:
gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
---
@@ -0,0 +1,39 @@
+/*
+ * 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.groovy.jsr223;
+
+import org.apache.tinkerpop.gremlin.jsr223.Customizer;
+
+/**
+ * Provides some custom compilation options to the {@link
GremlinGroovyScriptEngine}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+class CompilationOptionsCustomizer implements Customizer {
+
+ private final int expectedCompilationTime;
+
+ public CompilationOptionsCustomizer(final int expectedCompilationTime)
{
--- End diff --
Ok. I'm just trying to figure out how to test the compilation timeout
without having a 5-second script. I would like to set the timeout to 1ms.
Even using the deprecated config doesn't seem to work for me.
```
compilerCustomizerProviders: {
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompilationOptionsCustomizerProvider":
[1]}
```
Error:
```
[WARN] ScriptEngines - Could not instantiate CompilerCustomizerProvider
implementation
[org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.CompilationOptionsCustomizerProvider].
It will not be applied.
java.lang.IllegalStateException: Could not configure
org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ConfigurationCustomizerProvider
with the supplied options [1]
at
org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.lambda$createScriptEngine$15(ScriptEngines.java:418)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at
org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.createScriptEngine(ScriptEngines.java:399)
at
org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.reload(ScriptEngines.java:187)
at
org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$createScriptEngines$13(GremlinExecutor.java:512)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---