You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/09/11 17:12:39 UTC
[2/5] git commit: Fixed test
Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e35548cd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e35548cd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e35548cd
Branch: refs/heads/master
Commit: e35548cdd0ff4dc76a76d500ce79b77480b87443
Parents: 37b9e54
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Sep 11 17:11:35 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Sep 11 17:11:35 2013 +0200
----------------------------------------------------------------------
.../netty/http/NettyHttpStreamCacheFileResponseTest.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/e35548cd/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();