Harden SolrJmxReporterCloudTest

null out local ref to PlatformMBeanServer so test runner doesn't count it's memory size against the test class
This commit is contained in:
Chris Hostetter 2019-08-09 15:27:28 -07:00
parent 2e5c554fea
commit 6cbe39c786
1 changed files with 6 additions and 1 deletions

View File

@ -35,6 +35,7 @@ import org.apache.solr.common.params.CommonParams;
import org.apache.solr.metrics.SolrMetricManager;
import org.apache.solr.metrics.SolrMetricReporter;
import org.apache.solr.metrics.reporters.jmx.JmxMetricsReporter;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
@ -60,9 +61,13 @@ public class SolrJmxReporterCloudTest extends SolrCloudTestCase {
.setMaxShardsPerNode(2)
.process(cluster.getSolrClient());
}
@AfterClass
public static void releaseMBeanServer() {
mBeanServer = null;
}
@Test
//Commented 14-Oct-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
public void testJmxReporter() throws Exception {
CollectionAdminRequest.reloadCollection(COLLECTION).processAndWait(cluster.getSolrClient(), 60);
CloudSolrClient solrClient = cluster.getSolrClient();