You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2020/06/05 18:40:34 UTC
[lucene-solr] branch master updated: Assume the 'javascript' engine
is supported before trying test,
to prevent spurious failures on systems w/o javascript engine
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 924e7d5 Assume the 'javascript' engine is supported before trying test, to prevent spurious failures on systems w/o javascript engine
924e7d5 is described below
commit 924e7d5cd6e29fb736fb462e09fd0a1a05a7649a
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Fri Jun 5 11:39:08 2020 -0700
Assume the 'javascript' engine is supported before trying test, to prevent spurious failures on systems w/o javascript engine
---
solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
index 73c1dc9..1dc2d04 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
@@ -39,6 +39,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
+import javax.script.ScriptEngineManager;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.io.FileUtils;
@@ -83,6 +84,7 @@ import org.apache.solr.util.ExternalPaths;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.junit.After;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -344,6 +346,9 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
@Test
public void testUploadWithScriptUpdateProcessor() throws Exception {
+ Assume.assumeNotNull((new ScriptEngineManager()).getEngineByExtension("js"));
+ Assume.assumeNotNull((new ScriptEngineManager()).getEngineByName("JavaScript"));
+
// Authorization off
// unprotectConfigsHandler(); // TODO Enable this back when testUploadWithLibDirective() is re-enabled
final String untrustedSuffix = "-untrusted";