Skip to content

Apache Lucene open-source search software

Fixed a test failing on Windows (slash/backslash inconsistency). I check for an alternative, don't know if it should be normalized on persist.

Dawid Weiss9d55bcc9ca1c
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java
index 59fa18c64d6..eb1468795d7 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java
@@ -263,7 +263,7 @@ public class TestSolrProperties extends LuceneTestCase {
fis = new FileInputStream(new File(solrXml.getParent(), "solr-persist.xml"));
try {
Document document = builder.parse(fis);
- assertTrue(exists("/solr/cores/core[@name='collection1' and @instanceDir='./']", document));
+ assertTrue(exists("/solr/cores/core[@name='collection1' and (@instanceDir='./' or @instanceDir='.\\')]", document));
} finally {
fis.close();
}