Skip to content

Commit

Permalink
Fix test suite for compatibility with Solr 9.1. (vufind-org#42)
Browse files Browse the repository at this point in the history
- Works around test suite bug introduced in Solr 9.1 (see SOLR-16553)
- Makes sure build fails when tests fail
  • Loading branch information
demiankatz authored Feb 28, 2023
1 parent ca85333 commit cec8dd7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<property name="vufind.dir" value="/usr/local/vufind"/>
<property name="absolute.vufind.dir" location="${vufind.dir}"/>
<property name="solr.solr.home" value="${absolute.vufind.dir}/solr/vufind"/>
<!-- The solr.install.dir property was added to work around an issue in the Solr 9.1 test suite;
it can probably be safely removed once VuFind upgrades to Solr 9.2 or higher. -->
<property name="solr.install.dir" value="${absolute.vufind.dir}/solr/vendor"/>
<property name="java.compat.version" value="1.8"/>
<property name="ant.build.javac.source" value="1.8"/>
<property name="ant.build.javac.target" value="1.8"/>
Expand All @@ -22,6 +25,9 @@
<fileset dir="libs">
<include name="**/*.jar"/>
</fileset>
<fileset dir="tests/lib">
<include name="**/*.jar"/>
</fileset>
<!-- For Solr 8 and below: -->
<fileset erroronmissingdir="false" dir="${absolute.vufind.dir}/solr/vendor/contrib/analysis-extras">
<include name="**/*.jar"/>
Expand Down Expand Up @@ -202,9 +208,10 @@
<compilerarg line="-encoding UTF-8" />
</javac>

<junit showoutput="yes" fork="true">
<junit showoutput="yes" fork="true" haltonfailure="on">
<sysproperty key="absolute.vufind.dir" value="${absolute.vufind.dir}" />
<sysproperty key="solr.solr.home" value="${solr.solr.home}" />
<sysproperty key="solr.install.dir" value="${solr.install.dir}" />
<jvmarg value="-Dfile.encoding=UTF-8" />
<classpath>
<pathelement location="tests/lib/junit-4.11.jar"/>
Expand Down

0 comments on commit cec8dd7

Please sign in to comment.