Author: davsclaus
Date: Mon Mar 25 13:24:30 2013
New Revision: 1460651
URL: http://svn.apache.org/r1460651
Log:
CAMEL-6027: Ensure cleanup for JMX tests with create connector. And dont run
some tests on solaris which wont work.
Modified:
camel/branches/camel-2.10.x/ (props changed)
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/ManagedRouteWithOnExceptionTest.java
Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1460650
Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java?rev=1460651&r1=1460650&r2=1460651&view=diff
==============================================================================
---
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
(original)
+++
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
Mon Mar 25 13:24:30 2013
@@ -48,12 +48,13 @@ public class JmxInstrumentationWithConne
String os = System.getProperty("os.name");
boolean aix = os.toLowerCase(Locale.ENGLISH).contains("aix");
boolean windows = os.toLowerCase(Locale.ENGLISH).contains("windows");
+ boolean solaris = os.toLowerCase(Locale.ENGLISH).contains("sunos");
- // Does not work on AIX and the problem is hard to identify, could be
issues not allowing to use a custom port
+ // Does not work on AIX / solaris and the problem is hard to identify,
could be issues not allowing to use a custom port
// java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.NameNotFoundException: jmxrmi/camel
// windows CI servers is often slow/tricky so skip as well
- return !aix && !windows;
+ return !aix && !solaris && !windows;
}
@Override
@@ -81,6 +82,14 @@ public class JmxInstrumentationWithConne
}
clientConnector = null;
}
+ // restore environment to original state
+ // the following properties may have been set by specialization of
this test class
+ System.clearProperty(JmxSystemPropertyKeys.USE_PLATFORM_MBS);
+ System.clearProperty(JmxSystemPropertyKeys.DOMAIN);
+ System.clearProperty(JmxSystemPropertyKeys.MBEAN_DOMAIN);
+ System.clearProperty(JmxSystemPropertyKeys.CREATE_CONNECTOR);
+ System.clearProperty(JmxSystemPropertyKeys.REGISTRY_PORT);
+
super.tearDown();
}
Modified:
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/ManagedRouteWithOnExceptionTest.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/ManagedRouteWithOnExceptionTest.java?rev=1460651&r1=1460650&r2=1460651&view=diff
==============================================================================
---
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/ManagedRouteWithOnExceptionTest.java
(original)
+++
camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/management/ManagedRouteWithOnExceptionTest.java
Mon Mar 25 13:24:30 2013
@@ -30,6 +30,12 @@ public class ManagedRouteWithOnException
super.setUp();
}
+ @Override
+ protected void tearDown() throws Exception {
+ System.clearProperty(JmxSystemPropertyKeys.CREATE_CONNECTOR);
+ super.tearDown();
+ }
+
public void testShouldBeInstrumentedOk() throws Exception {
getMockEndpoint("mock:error").expectedMessageCount(0);
getMockEndpoint("mock:result").expectedMessageCount(1);