mirror of https://github.com/apache/lucene.git
LUCENE-5281: fix test bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1531714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a1d0068a93
commit
894813029f
|
@ -473,6 +473,9 @@ public class TestDirectoryTaxonomyReader extends FacetTestCase {
|
||||||
int numCategories = atLeast(10);
|
int numCategories = atLeast(10);
|
||||||
int numA = 0, numB = 0;
|
int numA = 0, numB = 0;
|
||||||
Random random = random();
|
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++) {
|
for (int i = 0; i < numCategories; i++) {
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
taxoWriter.addCategory(new CategoryPath("a", Integer.toString(i)));
|
taxoWriter.addCategory(new CategoryPath("a", Integer.toString(i)));
|
||||||
|
|
Loading…
Reference in New Issue