You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/09/02 03:42:12 UTC

[2/2] git commit: Try to fixed the unit test errors of CI slower box

Try to fixed the unit test errors of CI slower box


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/77293072
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/77293072
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/77293072

Branch: refs/heads/master
Commit: 772930720a55568f68e694b631299aee595df865
Parents: 6f0c0f6
Author: Willem Jiang <ni...@apache.org>
Authored: Mon Sep 2 09:41:35 2013 +0800
Committer: Willem Jiang <ni...@apache.org>
Committed: Mon Sep 2 09:41:35 2013 +0800

----------------------------------------------------------------------
 .../camel/processor/jpa/JpaProducerConcurrentTest.java       | 2 +-
 .../camel/dataformat/zipfile/ZipFileDataFormatTest.java      | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/77293072/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
index 5678083..8e753aa 100644
--- a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
+++ b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
@@ -62,7 +62,7 @@ public class JpaProducerConcurrentTest extends AbstractJpaTest {
             responses.put(index, out);
         }
 
-        assertMockEndpointsSatisfied(20, TimeUnit.SECONDS);
+        assertMockEndpointsSatisfied(30, TimeUnit.SECONDS);
 
         assertEquals(files, responses.size());
 

http://git-wip-us.apache.org/repos/asf/camel/blob/77293072/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
index e1d6d48..b16daeb 100644
--- a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
+++ b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
@@ -120,11 +120,17 @@ public class ZipFileDataFormatTest extends CamelTestSupport {
 
     @Test
     public void testZipToFileWithFileName() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:zipToFile");
+        mock.expectedMessageCount(1);
+        
         File file = new File(TEST_DIR, "poem.txt.zip");
         assertFalse(file.exists());
 
         template.sendBodyAndHeader("direct:zipToFile", TEXT, FILE_NAME, "poem.txt");
 
+        // just make sure the file is created
+        mock.assertIsSatisfied();
+        
         assertTrue(file.exists());
         assertTrue(ObjectHelper.equalByteArray(getZippedText("poem.txt"), getBytes(file)));
     }
@@ -167,7 +173,7 @@ public class ZipFileDataFormatTest extends CamelTestSupport {
                 from("direct:zip").marshal(zip).to("mock:zip");
                 from("direct:unzip").unmarshal(zip).to("mock:unzip");
                 from("direct:zipAndUnzip").marshal(zip).unmarshal(zip).to("mock:zipAndUnzip");
-                from("direct:zipToFile").marshal(zip).to("file:" + TEST_DIR.getPath());
+                from("direct:zipToFile").marshal(zip).to("file:" + TEST_DIR.getPath()).to("mock:zipToFile");
                 from("direct:dslZip").marshal().zipFile().to("mock:dslZip");
                 from("direct:dslUnzip").unmarshal().zipFile().to("mock:dslUnzip");
             }