From 9ac5c1cf149fdd393209795226dd7ee792b767b2 Mon Sep 17 00:00:00 2001 From: Mikhail Khludnev Date: Sat, 3 Sep 2016 23:52:47 +0300 Subject: [PATCH] FOLR-5725: test fix for miserable differnce between cloud and non-cloud facets - when facet.limit=0&facet.missing=true the former responds with missing counts, but later doesn't. --- .../component/DistributedFacetExistsSmallTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java index 4a827be9a1e..22dfca302f0 100644 --- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java +++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java @@ -133,7 +133,16 @@ public class DistributedFacetExistsSmallTest extends BaseDistributedSearchTestCa params.add("facet.mincount", rand.nextBoolean() ? "0": "1" ); } + final boolean shardRespondsWithMissingEvenLimitIsZero = + params.getBool("facet.missing", false) && params.getInt("facet.limit", 100)==0; + // skip miss count check, here cloud is different to non-distrib + if (shardRespondsWithMissingEvenLimitIsZero ) { + handle.put(null, SKIP); + } query(params); + if (shardRespondsWithMissingEvenLimitIsZero ) { + handle.remove(null); + } } private void checkInvalidMincount() throws SolrServerException, IOException {