diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml index 944777515dd..0733d5c19dd 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml @@ -22,8 +22,11 @@ A solrconfig.xml snippet containing indexConfig settings for randomized testing. --> - - + + ${useCompoundFile:false} diff --git a/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java b/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java index c660912ae63..77267cb01d7 100644 --- a/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java +++ b/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.apache.lucene.index.TieredMergePolicy; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.store.Directory; import org.apache.solr.SolrTestCaseJ4; @@ -46,6 +47,7 @@ public class DirectUpdateHandlerTest extends SolrTestCaseJ4 { savedFactory = System.getProperty("solr.DirectoryFactory"); System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockFSDirectoryFactory"); System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_ + System.setProperty("solr.tests.mergePolicy", TieredMergePolicy.class.getName()); initCore("solrconfig.xml", "schema12.xml"); } @@ -271,13 +273,14 @@ public class DirectUpdateHandlerTest extends SolrTestCaseJ4 { assertU(commit()); assertU(adoc("id","3")); - assertU(adoc("id","2")); + assertU(adoc("id","2")); // dup, triggers delete assertU(adoc("id","4")); assertU(commit()); SolrQueryRequest sr = req("q","foo"); DirectoryReader r = sr.getSearcher().getIndexReader(); - assertTrue(r.maxDoc() > r.numDocs()); // should have deletions + assertTrue("maxDoc !> numDocs ... expected some deletions", + r.maxDoc() > r.numDocs()); sr.close(); assertU(commit("expungeDeletes","true"));