camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r774221 - in /camel/trunk/camel-core/src/test/java/org/apache/camel/management: JmxInstrumentationCustomMBeanTest.java JmxInstrumentationDisableTest.java JmxInstrumentationUsingDefaultsTest.java JmxInstrumentationWithConnectorTest.java
Date Wed, 13 May 2009 06:02:16 GMT
Author: davsclaus
Date: Wed May 13 06:02:16 2009
New Revision: 774221

URL: http://svn.apache.org/viewvc?rev=774221&view=rev
Log:
AIX cannot run one of the JMX unit tests so disabled it for that platform

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java?rev=774221&r1=774220&r2=774221&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationCustomMBeanTest.java
Wed May 13 06:02:16 2009
@@ -34,6 +34,10 @@
 public class JmxInstrumentationCustomMBeanTest extends JmxInstrumentationUsingDefaultsTest
{
 
     public void testCustomEndpoint() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
+
         if (System.getProperty(JmxSystemPropertyKeys.USE_PLATFORM_MBS) != null
                 && !Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS)) {
             assertEquals(domainName, mbsc.getDefaultDomain());
@@ -46,6 +50,10 @@
     }
 
     public void testManagedEndpoint() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
+
         if (System.getProperty(JmxSystemPropertyKeys.USE_PLATFORM_MBS) != null
                 && !Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS)) {
             assertEquals(domainName, mbsc.getDefaultDomain());
@@ -62,6 +70,10 @@
     }
 
     public void testCounters() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
+
         CustomEndpoint resultEndpoint = resolveMandatoryEndpoint("custom:end", CustomEndpoint.class);
         resultEndpoint.expectedBodiesReceived("<hello>world!</hello>");
         sendBody("direct:start", "<hello>world!</hello>");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java?rev=774221&r1=774220&r2=774221&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
Wed May 13 06:02:16 2009
@@ -44,6 +44,10 @@
 
     @Override
     public void testMBeansRegistered() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
+
         if (System.getProperty(JmxSystemPropertyKeys.USE_PLATFORM_MBS) != null
                 && !Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS)) {
             assertEquals(domainName, mbsc.getDefaultDomain());

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java?rev=774221&r1=774220&r2=774221&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
Wed May 13 06:02:16 2009
@@ -42,7 +42,15 @@
     protected MBeanServerConnection mbsc;
     protected long sleepForConnection;
 
+    protected boolean canRunOnThisPlatform() {
+        return true;
+    }
+
     public void testMBeansRegistered() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
+
         if (System.getProperty(JmxSystemPropertyKeys.USE_PLATFORM_MBS) != null
                 && !Boolean.getBoolean(JmxSystemPropertyKeys.USE_PLATFORM_MBS)) {
             assertEquals(domainName, mbsc.getDefaultDomain());
@@ -64,6 +72,10 @@
     }
 
     public void testCounters() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
+
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:end", MockEndpoint.class);
         resultEndpoint.expectedBodiesReceived("<hello>world!</hello>");
         sendBody("direct:start", "<hello>world!</hello>");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java?rev=774221&r1=774220&r2=774221&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
Wed May 13 06:02:16 2009
@@ -33,6 +33,13 @@
         "service:jmx:rmi:///jndi/rmi://localhost:2123/jmxrmi/camel";
     protected JMXConnector clientConnector;
 
+    protected boolean canRunOnThisPlatform() {
+        String os = System.getProperty("os.name");
+        // Does not work on AIX 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
+        return !os.toLowerCase().contains("aix");
+    }
+
     @Override
     protected void setUp() throws Exception {
         sleepForConnection = 3000;



Mime
View raw message