tests: don't make it an error if counts aren't reset

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1236768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2012-01-27 17:14:47 +00:00
parent 440a7991d3
commit a557fb9f24
1 changed files with 7 additions and 1 deletions

View File

@ -113,7 +113,13 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
numOpens = SolrIndexSearcher.numOpens.getAndSet(0);
numCloses = SolrIndexSearcher.numCloses.getAndSet(0);
if (numOpens != 0 || numCloses != 0) {
log.error("startTrackingSearchers: numOpens="+numOpens+"numCloses="+numCloses);
// NOTE: some other tests don't use this base class and hence won't reset the counts.
log.warn("startTrackingSearchers: numOpens="+numOpens+" numCloses="+numCloses);
try {
throw new RuntimeException();
} catch (Exception e) {
log.error("",e);
}
numOpens = numCloses = 0;
}
}