Skip to content

Commit 7b93f1c

Browse files
author
Ishan Chattopadhyaya
committed
Test fixes for Solr 9.6
1 parent 5afa949 commit 7b93f1c

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.apache.solr.handler.dataimport;
1818

1919
import org.apache.commons.io.FileUtils;
20+
import org.apache.solr.embedded.JettyConfig;
2021
import org.apache.solr.embedded.JettySolrRunner;
2122
import org.apache.solr.client.solrj.impl.HttpSolrClient;
2223
import org.apache.solr.client.solrj.request.DirectXmlRequest;
@@ -184,6 +185,10 @@ private JettySolrRunner createAndStartJetty(SolrInstance instance) throws Except
184185
return jetty;
185186
}
186187

188+
private static JettyConfig buildJettyConfig(String context) {
189+
return JettyConfig.builder().setContext(context).stopAtShutdown(true).build();
190+
}
191+
187192
static String xml = "<root>\n"
188193
+ "<b>\n"
189194
+ " <id>1</id>\n"

src/test/java/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.apache.commons.io.FileUtils;
3333
import org.apache.lucene.util.IOUtils;
3434
import org.apache.solr.client.solrj.SolrServerException;
35+
import org.apache.solr.embedded.JettyConfig;
3536
import org.apache.solr.embedded.JettySolrRunner;
3637
import org.apache.solr.client.solrj.impl.HttpSolrClient;
3738
import org.apache.solr.common.SolrInputDocument;
@@ -371,4 +372,8 @@ private JettySolrRunner createAndStartJetty(SolrInstance instance) throws Except
371372
return jetty;
372373
}
373374

375+
private static JettyConfig buildJettyConfig(String context) {
376+
return JettyConfig.builder().setContext(context).stopAtShutdown(true).build();
377+
}
378+
374379
}

src/test/resources/dih/solr/collection1/conf/contentstream-solrconfig.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
2121
<indexConfig>
2222
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
23+
<lockType>${solr.lock.type:single}</lockType>
2324
</indexConfig>
2425

2526
<!-- Used to specify an alternate directory to hold all index data

src/test/resources/dih/solr/collection1/conf/dataimport-solrconfig.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
2121
<indexConfig>
2222
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
23+
<lockType>${solr.lock.type:single}</lockType>
2324
</indexConfig>
2425

2526
<!-- Used to specify an alternate directory to hold all index data

0 commit comments

Comments
 (0)