[SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar.

master
Sam Brannen 14 years ago
parent 309fa92199
commit 45c6eb1d62
  1. 6
      org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java
  2. 10
      org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java
  3. 6
      org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java
  4. 19
      org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java

@ -186,8 +186,10 @@ public class MBeanClientInterceptorTests extends AbstractMBeanServerTests {
} }
} }
// @Ignore has no effect for JUnit 3.8 tests; however, we leave it // @Ignore should have no effect for JUnit 3.8 tests; however, it appears
// here so that developers can easily search for ignored tests. // 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*. // Once fixed, renamed to test* instead of ignore*.
@Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.") @Ignore("Requires jmxremote_optional.jar; see comments in AbstractMBeanServerTests for details.")

@ -26,9 +26,16 @@ import javax.management.remote.JMXConnectorServer;
import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL; import javax.management.remote.JMXServiceURL;
import org.junit.Ignore;
/** /**
* @author Rob Harrop * @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 { public class RemoteMBeanClientInterceptorTests extends MBeanClientInterceptorTests {
private static final String SERVICE_URL = "service:jmx:jmxmp://localhost:9876"; private static final String SERVICE_URL = "service:jmx:jmxmp://localhost:9876";
@ -42,8 +49,7 @@ public class RemoteMBeanClientInterceptorTests extends MBeanClientInterceptorTes
this.connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(getServiceUrl(), null, getServer()); this.connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(getServiceUrl(), null, getServer());
try { try {
this.connectorServer.start(); this.connectorServer.start();
} } catch (BindException ex) {
catch (BindException ex) {
// skipping tests, server already running at this port // skipping tests, server already running at this port
runTests = false; runTests = false;
} }

@ -28,11 +28,17 @@ import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL; import javax.management.remote.JMXServiceURL;
import org.junit.Ignore;
import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.jmx.AbstractMBeanServerTests;
/** /**
* @author Rob Harrop * @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 { public class ConnectorServerFactoryBeanTests extends AbstractMBeanServerTests {
private static final String OBJECT_NAME = "spring:type=connector,name=test"; private static final String OBJECT_NAME = "spring:type=connector,name=test";

@ -23,6 +23,7 @@ import javax.management.remote.JMXConnectorServer;
import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL; import javax.management.remote.JMXServiceURL;
import org.junit.Ignore;
import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.AopUtils;
import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.jmx.AbstractMBeanServerTests;
@ -42,7 +43,14 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe
return JMXConnectorServerFactory.newJMXConnectorServer(getServiceUrl(), null, getServer()); 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(); JMXConnectorServer connectorServer = getConnectorServer();
connectorServer.start(); 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(); MBeanServerConnectionFactoryBean bean = new MBeanServerConnectionFactoryBean();
bean.setServiceUrl(SERVICE_URL); bean.setServiceUrl(SERVICE_URL);
bean.setConnectOnStartup(false); bean.setConnectOnStartup(false);

Loading…
Cancel
Save