Apache Lucene open-source search software
LUCENE-5281: fix test bug
Shai Erera894813029f3d
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.javaindex 370e8892c89..61e36696fae 100644--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java@@ -473,6 +473,9 @@ public class TestDirectoryTaxonomyReader extends FacetTestCase {int numCategories = atLeast(10);int numA = 0, numB = 0;Random random = random();+ // add the two categories for which we'll also add children (so asserts are simpler)+ taxoWriter.addCategory(new CategoryPath("a"));+ taxoWriter.addCategory(new CategoryPath("b"));for (int i = 0; i < numCategories; i++) {if (random.nextBoolean()) {taxoWriter.addCategory(new CategoryPath("a", Integer.toString(i)));