From ffa48dd967932a8637c68893e1abc1ed3df9c151 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Wed, 10 Apr 2013 22:18:06 +0000 Subject: [PATCH] fix test to stop if indexing threads hits an exception git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1466714 13f79535-47bb-0310-9956-ffa450edef68 --- .../search/TestSearcherTaxonomyManager.java | 65 ++++++++++--------- 1 file changed, 34 insertions(+), 31 deletions(-) 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); } } };