SOLR-4753: add assert so that tests fail when SolrCores are closed too many times

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1471114 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-04-23 19:44:52 +00:00
parent dea93395d0
commit ffbaa58de0
2 changed files with 1 additions and 4 deletions

View File

@ -963,6 +963,7 @@ public final class SolrCore implements SolrInfoMBean {
if (count > 0) return; // close is called often, and only actually closes if nothing is using it.
if (count < 0) {
log.error("Too many close [count:{}] on {}. Please report this exception to solr-user@lucene.apache.org", count, this );
assert false : "Too many closes on SolrCore";
return;
}
log.info(logid+" CLOSING SolrCore " + this);

View File

@ -390,10 +390,6 @@ public class TestLazyCores extends SolrTestCaseJ4 {
"/solr/cores/core[@name='core3']",
"/solr/cores/core[@name='core4']");
assertXmlFile(oneXml, "13=count(/solr/cores/core)");
core1.close();
core2.close();
core3.close();
core4.close();
removeOne(cc, "collectionLazy2");
removeOne(cc, "collectionLazy3");