Author: kwright
Date: Sun Sep 13 10:58:53 2020
New Revision: 1881681
URL: http://svn.apache.org/viewvc?rev=1881681&view=rev
Log:
Fix so that ES test runs in both maven and ant
Modified:
manifoldcf/branches/release-2.17-branch/ (props changed)
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/ (props
changed)
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseITHSQLDB.java
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/pom.xml
manifoldcf/branches/release-2.17-branch/framework/buildfiles/connector-build.xml
Propchange: manifoldcf/branches/release-2.17-branch/
------------------------------------------------------------------------------
Merged /manifoldcf/trunk:r1881672
Propchange: manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Sep 13 10:58:53 2020
@@ -8,3 +8,5 @@ test-postgresql-output
test-HSQLDB-output
test-HSQLDBext-output
test-mysql-output
+test-materials/unix
+test-materials/windows
Modified:
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseITHSQLDB.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseITHSQLDB.java?rev=1881681&r1=1881680&r2=1881681&view=diff
==============================================================================
---
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseITHSQLDB.java
(original)
+++
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/connector/src/test/java/org/apache/manifoldcf/agents/output/elasticsearch/tests/BaseITHSQLDB.java
Sun Sep 13 10:58:53 2020
@@ -81,15 +81,25 @@ public class BaseITHSQLDB extends org.ap
{
final ProcessBuilder pb = new ProcessBuilder();
+ if (System.getenv("JAVA_HOME")!= null) {
+ pb.environment().put("JAVA_HOME", System.getenv("JAVA_HOME"));
+ } else {
+ throw new Exception("JAVA_HOME is required to be set for this test");
+ }
+
final File absFile = new File(".").getAbsoluteFile();
System.out.println("ES working directory is '"+absFile+"'");
pb.directory(absFile);
+ final String testMaterialsPath = System.getProperty("testMaterialsPath");
+ if (testMaterialsPath == null) {
+ throw new Exception("Can't find testMaterialsPath argument; test cannot
be run");
+ }
if (isUnix) {
- pb.command("bash", "-c",
"../test-materials/unix/elasticsearch-7.6.2/bin/elasticsearch -q
-Expack.ml.enabled=false");
+ pb.command("bash", "-c", testMaterialsPath +
"unix/elasticsearch-7.6.2/bin/elasticsearch -q -Expack.ml.enabled=false");
System.out.println("Unix process");
} else {
- pb.command("cmd.exe", "/c",
"..\\test-materials\\windows\\elasticsearch-7.6.2\\bin\\elasticsearch.bat -q
-Expack.ml.enabled=false");
+ pb.command("cmd.exe", "/c", testMaterialsPath.replace("/", "\\") +
"windows\\elasticsearch-7.6.2\\bin\\elasticsearch.bat -q
-Expack.ml.enabled=false");
System.out.println("Windows process");
}
Modified:
manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/pom.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/pom.xml?rev=1881681&r1=1881680&r2=1881681&view=diff
==============================================================================
--- manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/pom.xml
(original)
+++ manifoldcf/branches/release-2.17-branch/connectors/elasticsearch/pom.xml
Sun Sep 13 10:58:53 2020
@@ -171,6 +171,7 @@
<crawlerWarPath>../dependency/mcf-crawler-ui.war</crawlerWarPath>
<authorityserviceWarPath>../dependency/mcf-authority-service.war</authorityserviceWarPath>
<apiWarPath>../dependency/mcf-api-service.war</apiWarPath>
+ <testMaterialsPath>../../test-materials/</testMaterialsPath>
</systemPropertyVariables>
<excludes>
<exclude>**/*Postgresql*.java</exclude>
Modified:
manifoldcf/branches/release-2.17-branch/framework/buildfiles/connector-build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/release-2.17-branch/framework/buildfiles/connector-build.xml?rev=1881681&r1=1881680&r2=1881681&view=diff
==============================================================================
---
manifoldcf/branches/release-2.17-branch/framework/buildfiles/connector-build.xml
(original)
+++
manifoldcf/branches/release-2.17-branch/framework/buildfiles/connector-build.xml
Sun Sep 13 10:58:53 2020
@@ -1048,6 +1048,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1071,6 +1072,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1094,6 +1096,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1117,6 +1120,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web-proprietary/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web-proprietary/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web-proprietary/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1140,6 +1144,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1163,6 +1168,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1186,6 +1192,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1209,6 +1216,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web-proprietary/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web-proprietary/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web-proprietary/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1236,6 +1244,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1263,6 +1272,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1290,6 +1300,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>
@@ -1317,6 +1328,7 @@
<jvmarg
value="-DauthorityserviceWarPath=${mcf-dist}/web-proprietary/war/mcf-authority-service.war"/>
<jvmarg
value="-DapiWarPath=${mcf-dist}/web-proprietary/war/mcf-api-service.war"/>
<jvmarg
value="-DcombinedWarPath=${mcf-dist}/web-proprietary/war/mcf-combined-service.war"/>
+ <jvmarg value="-DtestMaterialsPath=../test-materials/"/>
<classpath>
<fileset dir="${env.JAVA_HOME}/lib">
<include name="tools.jar"/>