diff --git a/lucene/facet/src/test/org/apache/lucene/facet/search/TestSearcherTaxonomyManager.java b/lucene/facet/src/test/org/apache/lucene/facet/search/TestSearcherTaxonomyManager.java index d5315483ca0..4189a840838 100644 --- a/lucene/facet/src/test/org/apache/lucene/facet/search/TestSearcherTaxonomyManager.java +++ b/lucene/facet/src/test/org/apache/lucene/facet/search/TestSearcherTaxonomyManager.java @@ -54,42 +54,45 @@ public class TestSearcherTaxonomyManager extends LuceneTestCase { Thread indexer = new Thread() { @Override public void run() { - Set seen = new HashSet(); - List paths = new ArrayList(); - while (true) { - Document doc = new Document(); - List docPaths = new ArrayList(); - int numPaths = _TestUtil.nextInt(random(), 1, 5); - for(int i=0;i seen = new HashSet(); + List paths = new ArrayList(); + while (true) { + Document doc = new Document(); + List docPaths = new ArrayList(); + int numPaths = _TestUtil.nextInt(random(), 1, 5); + for(int i=0;i= ordLimit) { - stop.set(true); - break; + if (tw.getSize() >= ordLimit) { + break; + } } + } finally { + stop.set(true); } } };