From 17d2d55daa156fe36056f40a74babae5d37b2e75 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 8 Feb 2013 15:49:21 +0000 Subject: [PATCH] SOLR-4418: workaround git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1444084 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/core/TestJmxIntegration.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java b/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java index 4376caff521..0c23a870d0c 100644 --- a/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java +++ b/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java @@ -16,18 +16,20 @@ */ package org.apache.solr.core; +import java.lang.management.ManagementFactory; +import java.util.*; +import javax.management.*; + +import org.apache.lucene.util.Constants; import org.apache.solr.core.JmxMonitoredMap.SolrDynamicMBean; import org.apache.solr.util.AbstractSolrTestCase; import org.junit.After; +import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; -import javax.management.*; -import java.lang.management.ManagementFactory; -import java.util.*; - /** * Test for JMX Integration * @@ -80,6 +82,11 @@ public class TestJmxIntegration extends AbstractSolrTestCase { @Test public void testJmxUpdate() throws Exception { + + // Workaround for SOLR-4418 (this test fails with "No + // mbean found for SolrIndexSearcher" on IBM J9 6.0 and 7.0): + Assume.assumeTrue(!"IBM Corporation".equals(Constants.JVM_VENDOR)); + List servers = MBeanServerFactory.findMBeanServer(null); log.info("Servers in testJmxUpdate: " + servers); log.info(h.getCore().getInfoRegistry().toString());