diff --git a/org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java b/org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java index e457cd6927..14d4bb2bfd 100644 --- a/org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java +++ b/org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java @@ -186,8 +186,10 @@ public class MBeanClientInterceptorTests extends AbstractMBeanServerTests { } } - // @Ignore has no effect for JUnit 3.8 tests; however, we leave it - // here so that developers can easily search for ignored tests. + // @Ignore should have no effect for JUnit 3.8 tests; however, it appears + // that tests on the CI server -- as well as those in Eclipse -- do in + // fact get ignored. So we leave @Ignore here so that developers can + // easily search for ignored tests. // // Once fixed, renamed to test* instead of ignore*. @Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.") diff --git a/org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java b/org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java index 86d59b300a..53c82f9631 100644 --- a/org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java +++ b/org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java @@ -26,24 +26,30 @@ import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; +import org.junit.Ignore; + /** * @author Rob Harrop */ +// @Ignore should have no effect for JUnit 3.8 tests; however, it appears +// that tests on the CI server -- as well as those in Eclipse -- do in +// fact get ignored. So we leave @Ignore here so that developers can +// easily search for ignored tests. +@Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.") public class RemoteMBeanClientInterceptorTests extends MBeanClientInterceptorTests { private static final String SERVICE_URL = "service:jmx:jmxmp://localhost:9876"; private JMXConnectorServer connectorServer; - private JMXConnector connector; - + private JMXConnector connector; + public void onSetUp() throws Exception { super.onSetUp(); this.connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(getServiceUrl(), null, getServer()); try { this.connectorServer.start(); - } - catch (BindException ex) { + } catch (BindException ex) { // skipping tests, server already running at this port runTests = false; } @@ -58,7 +64,7 @@ public class RemoteMBeanClientInterceptorTests extends MBeanClientInterceptorTes return this.connector.getMBeanServerConnection(); } - public void tearDown() throws Exception { + public void tearDown() throws Exception { if (this.connector != null) { this.connector.close(); } diff --git a/org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java b/org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java index 14d59d5baa..709a277195 100644 --- a/org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java +++ b/org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java @@ -28,11 +28,17 @@ import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; +import org.junit.Ignore; import org.springframework.jmx.AbstractMBeanServerTests; /** * @author Rob Harrop */ +// @Ignore should have no effect for JUnit 3.8 tests; however, it appears +// that tests on the CI server -- as well as those in Eclipse -- do in +// fact get ignored. So we leave @Ignore here so that developers can +// easily search for ignored tests. +@Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.") public class ConnectorServerFactoryBeanTests extends AbstractMBeanServerTests { private static final String OBJECT_NAME = "spring:type=connector,name=test"; diff --git a/org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java b/org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java index 4b7b92a644..c7c1736ca2 100644 --- a/org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java +++ b/org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java @@ -23,6 +23,7 @@ import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; +import org.junit.Ignore; import org.springframework.aop.support.AopUtils; import org.springframework.jmx.AbstractMBeanServerTests; @@ -42,7 +43,14 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe return JMXConnectorServerFactory.newJMXConnectorServer(getServiceUrl(), null, getServer()); } - public void testValidConnection() throws Exception { + // @Ignore should have no effect for JUnit 3.8 tests; however, it appears + // that tests on the CI server -- as well as those in Eclipse -- do in + // fact get ignored. So we leave @Ignore here so that developers can + // easily search for ignored tests. + // + // Once fixed, renamed to test* instead of ignore*. + @Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.") + public void ignoreTestValidConnection() throws Exception { JMXConnectorServer connectorServer = getConnectorServer(); connectorServer.start(); @@ -75,7 +83,14 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe } } - public void testWithLazyConnection() throws Exception { + // @Ignore should have no effect for JUnit 3.8 tests; however, it appears + // that tests on the CI server -- as well as those in Eclipse -- do in + // fact get ignored. So we leave @Ignore here so that developers can + // easily search for ignored tests. + // + // Once fixed, renamed to test* instead of ignore*. + @Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.") + public void ignoreTestWithLazyConnection() throws Exception { MBeanServerConnectionFactoryBean bean = new MBeanServerConnectionFactoryBean(); bean.setServiceUrl(SERVICE_URL); bean.setConnectOnStartup(false);