camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/5] git commit: Fixed test
Date Wed, 11 Sep 2013 15:12:41 GMT
Fixed test


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

Branch: refs/heads/camel-2.12.x
Commit: ccc19d853a51e95b12451b2bc9be9f22bdbd461d
Parents: 0f03f94
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Sep 11 17:11:35 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Sep 11 17:12:00 2013 +0200

----------------------------------------------------------------------
 .../netty/http/NettyHttpStreamCacheFileResponseTest.java       | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ccc19d85/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
index d2cda96..edfbf80 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
@@ -19,7 +19,9 @@ package org.apache.camel.component.netty.http;
 import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.util.concurrent.TimeUnit;
 
+import org.apache.camel.builder.NotifyBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Before;
 import org.junit.Test;
@@ -39,9 +41,13 @@ public class NettyHttpStreamCacheFileResponseTest extends BaseNettyTest
{
 
     @Test
     public void testStreamCacheToFileShouldBeDeletedInCaseOfResponse() throws Exception {
+        NotifyBuilder builder = new NotifyBuilder(context).whenDone(1).create();
+
         String out = template.requestBody("http://localhost:{{port}}/myserver", body, String.class);
         assertEquals(body2, out);
 
+        assertTrue(builder.matches(5, TimeUnit.SECONDS));
+
         // the temporary files should have been deleted
         File file = new File("target/cachedir");
         String[] files = file.list();


Mime
View raw message