camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r774225 - /camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/
Date Wed, 13 May 2009 06:13:50 GMT
Author: davsclaus
Date: Wed May 13 06:13:49 2009
New Revision: 774225

URL: http://svn.apache.org/viewvc?rev=774225&view=rev
Log:
Skip unit test on AIX that cannot run one of the JMX tests.

Modified:
    camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/ExceptionWithManagementTest.java
    camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
    camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
    camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
    camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java

Modified: camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/ExceptionWithManagementTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/ExceptionWithManagementTest.java?rev=774225&r1=774224&r2=774225&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/ExceptionWithManagementTest.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/ExceptionWithManagementTest.java
Wed May 13 06:13:49 2009
@@ -25,15 +25,13 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-
 /**
  * A testcase for exception handler when management is enabled (by default).
  * 
  * @version $Revision$
  */
 public class ExceptionWithManagementTest extends ContextTestSupport {
-    
-    
+
     public void testExceptionHandler() throws Exception {
         MockEndpoint error = this.resolveMandatoryEndpoint("mock:error", MockEndpoint.class);
         error.expectedMessageCount(1);
@@ -51,10 +49,7 @@
         Thread.sleep(2000);
         error.assertIsSatisfied();
         out.assertIsSatisfied();
-        
     }
-    
-    
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {

Modified: camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java?rev=774225&r1=774224&r2=774225&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationDisableTest.java
Wed May 13 06:13:49 2009
@@ -45,6 +45,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/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java?rev=774225&r1=774224&r2=774225&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
Wed May 13 06:13:49 2009
@@ -43,7 +43,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());
@@ -70,6 +78,9 @@
     }
 
     public void testCounters() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
 
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:end", MockEndpoint.class);
         resultEndpoint.expectedBodiesReceived("<hello>world!</hello>");

Modified: camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java?rev=774225&r1=774224&r2=774225&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationWithConnectorTest.java
Wed May 13 06:13:49 2009
@@ -44,6 +44,13 @@
         super.setUp();
     }
 
+    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 tearDown() throws Exception {
         System.clearProperty(JmxSystemPropertyKeys.REGISTRY_PORT);

Modified: camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java?rev=774225&r1=774224&r2=774225&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java
(original)
+++ camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java
Wed May 13 06:13:49 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());
@@ -71,6 +75,9 @@
 
     @Override
     public void testCounters() throws Exception {
+        if (!canRunOnThisPlatform()) {
+            return;
+        }
 
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:end", MockEndpoint.class);
         resultEndpoint.expectedBodiesReceived(



Mime
View raw message