From 04956b8a9075e15b4d633d254e035b781694da1e Mon Sep 17 00:00:00 2001 From: Cao Manh Dat Date: Mon, 21 Aug 2017 15:36:17 +0700 Subject: [PATCH] SOLR-11054: In SoftAutoCommitTest.testSoftAndHardCommitMaxDocs() all indexed docs must be searchable --- .../src/test/org/apache/solr/update/SoftAutoCommitTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java index 84ec63d6473..cb2affabed6 100644 --- a/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java +++ b/solr/core/src/test/org/apache/solr/update/SoftAutoCommitTest.java @@ -152,6 +152,12 @@ public class SoftAutoCommitTest extends AbstractSolrTestCase { minHardCommitNanos + "ns", minHardCommitNanos < firstHardNanos); + final Long firstSearcherNanos = monitor.searcher.poll(5000, MILLISECONDS); + assertNotNull("didn't get a single new searcher", firstSearcherNanos); + for (int i = 0; i <= softCommitMaxDocs; i++) { + assertQ("should find one", req("id:"+(8000 + i)) ,"//result[@numFound=1]" ); + } + // wait a bit, w/o other action we shouldn't see any new hard/soft commits assertNull("Got a hard commit we weren't expecting", monitor.hard.poll(1000, MILLISECONDS));