Browse Source

Revert "Re-enable ignored JMX tests"

As of SPR-8093, jmxremote_optional.jar is present on the build
server in jre/lib/ext, but it is not by default present on local
developer / user machines, meaning that the build ends up broken
by default.

Issue: SPR-8089, SPR-8093, SPR-8458

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4560 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/merge
Chris Beams 15 years ago
parent
commit
5a26457fca
  1. 12
      org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java
  2. 9
      org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java
  3. 8
      org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java
  4. 23
      org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java

12
org.springframework.context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java

@ -29,6 +29,7 @@ import javax.management.remote.JMXConnectorServer; @@ -29,6 +29,7 @@ import javax.management.remote.JMXConnectorServer;
import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL;
import org.junit.Ignore;
import org.springframework.jmx.AbstractMBeanServerTests;
import org.springframework.jmx.IJmxTestBean;
import org.springframework.jmx.JmxException;
@ -185,7 +186,16 @@ public class MBeanClientInterceptorTests extends AbstractMBeanServerTests { @@ -185,7 +186,16 @@ public class MBeanClientInterceptorTests extends AbstractMBeanServerTests {
}
}
public void testTestLazyConnectionToRemote() throws Exception {
// TODO [SPR-8089] Clean up ignored JMX 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.")
public void ignoreTestLazyConnectionToRemote() throws Exception {
if (!runTests)
return;

9
org.springframework.context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java

@ -26,9 +26,18 @@ import javax.management.remote.JMXConnectorServer; @@ -26,9 +26,18 @@ import javax.management.remote.JMXConnectorServer;
import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL;
import org.junit.Ignore;
/**
* @author Rob Harrop
*/
// TODO [SPR-8089] Clean up ignored JMX 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.
@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";

8
org.springframework.context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java

@ -28,11 +28,19 @@ import javax.management.remote.JMXConnector; @@ -28,11 +28,19 @@ 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
*/
// TODO [SPR-8089] Clean up ignored JMX 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.
@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";

23
org.springframework.context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java

@ -23,6 +23,7 @@ import javax.management.remote.JMXConnectorServer; @@ -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,16 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe @@ -42,7 +43,16 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe
return JMXConnectorServerFactory.newJMXConnectorServer(getServiceUrl(), null, getServer());
}
public void testTestValidConnection() throws Exception {
// TODO [SPR-8089] Clean up ignored JMX 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.")
public void ignoreTestValidConnection() throws Exception {
JMXConnectorServer connectorServer = getConnectorServer();
connectorServer.start();
@ -75,7 +85,16 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe @@ -75,7 +85,16 @@ public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTe
}
}
public void testTestWithLazyConnection() throws Exception {
// TODO [SPR-8089] Clean up ignored JMX 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.")
public void ignoreTestWithLazyConnection() throws Exception {
MBeanServerConnectionFactoryBean bean = new MBeanServerConnectionFactoryBean();
bean.setServiceUrl(SERVICE_URL);
bean.setConnectOnStartup(false);

Loading…
Cancel
Save