camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r887118 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/component/seda/SedaEndpoint.java test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java test/java/org/apache/camel/view/ModelFileGeneratorTest.java
Date Fri, 04 Dec 2009 08:57:51 GMT
Author: davsclaus
Date: Fri Dec  4 08:57:41 2009
New Revision: 887118

URL: http://svn.apache.org/viewvc?rev=887118&view=rev
Log:
Fixed unit test.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/view/ModelFileGeneratorTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java?rev=887118&r1=887117&r2=887118&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java
Fri Dec  4 08:57:41 2009
@@ -41,13 +41,13 @@
  * @version $Revision$
  */
 public class SedaEndpoint extends DefaultEndpoint implements BrowsableEndpoint {
-    private BlockingQueue<Exchange> queue;
+    private volatile BlockingQueue<Exchange> queue;
     private int size = 1000;
     private int concurrentConsumers = 1;
     private WaitForTaskToComplete waitForTaskToComplete = WaitForTaskToComplete.IfReplyExpected;
     private long timeout = 30000;
-    private Set<SedaProducer> producers = new CopyOnWriteArraySet<SedaProducer>();
-    private Set<SedaConsumer> consumers = new CopyOnWriteArraySet<SedaConsumer>();
+    private volatile Set<SedaProducer> producers = new CopyOnWriteArraySet<SedaProducer>();
+    private volatile Set<SedaConsumer> consumers = new CopyOnWriteArraySet<SedaConsumer>();
 
     public SedaEndpoint() {
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java?rev=887118&r1=887117&r2=887118&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherRefTest.java
Fri Dec  4 08:57:41 2009
@@ -58,7 +58,7 @@
             public void configure() throws Exception {
                 cool.setEndpointUriIfNotSpecified("cool");
 
-                from("direct:start").pollEnrichRef("cool", 0, "agg");
+                from("direct:start").pollEnrichRef("cool", 1000, "agg");
             }
         };
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/view/ModelFileGeneratorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/view/ModelFileGeneratorTest.java?rev=887118&r1=887117&r2=887118&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/view/ModelFileGeneratorTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/view/ModelFileGeneratorTest.java
Fri Dec  4 08:57:41 2009
@@ -31,8 +31,17 @@
     public void testGenerateModel() throws Exception {
         deleteDirectory(outputDirectory);
 
-        ModelFileGenerator generator = new ModelFileGenerator(JAXBContext.newInstance("org.apache.camel.model"));
-        generator.marshalRoutesUsingJaxb(outputDirectory + "/route.xml", context.getRouteDefinitions());
+        try {
+            ModelFileGenerator generator = new ModelFileGenerator(JAXBContext.newInstance("org.apache.camel.model"));
+            generator.marshalRoutesUsingJaxb(outputDirectory + "/route.xml", context.getRouteDefinitions());
+        } catch (IllegalArgumentException e) {
+            if (e.getMessage().startsWith("Not supported")) {
+                // ignore as some OS does not support indent-number etc.
+                return;
+            } else {
+                throw e;
+            }
+        }
 
         File out = new File(outputDirectory + "/route.xml").getAbsoluteFile();
         assertTrue("File should have been generated", out.exists());



Mime
View raw message