Repository: camel Updated Branches: refs/heads/master ad651342a -> e478a607e
Fixed broken test. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e478a607 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e478a607 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e478a607 Branch: refs/heads/master Commit: e478a607ed6f4ae11d6dbf7abc9577892e7ad10d Parents: ad65134 Author: Henryk Konsek <hekon...@gmail.com> Authored: Sat Feb 14 23:44:14 2015 +0100 Committer: Henryk Konsek <hekon...@gmail.com> Committed: Sat Feb 14 23:44:14 2015 +0100 ---------------------------------------------------------------------- .../boot/fatjarrouter/StandaloneFatJarRouterTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/e478a607/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/fatjarrouter/StandaloneFatJarRouterTest.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/fatjarrouter/StandaloneFatJarRouterTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/fatjarrouter/StandaloneFatJarRouterTest.java index eb49230..4ee21ae 100644 --- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/fatjarrouter/StandaloneFatJarRouterTest.java +++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/fatjarrouter/StandaloneFatJarRouterTest.java @@ -17,8 +17,10 @@ package org.apache.camel.spring.boot.fatjarrouter; import java.io.IOException; +import java.net.ConnectException; import java.net.URL; import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; import org.apache.commons.io.IOUtils; import org.junit.Assert; @@ -33,11 +35,15 @@ public class StandaloneFatJarRouterTest extends Assert { public void shouldStartCamelRoute() throws InterruptedException, IOException { // Given final int port = SocketUtils.findAvailableTcpPort(); - TestFatJarRouter.main("--spring.main.sources=org.apache.camel.spring.boot.FatJarRouter", "--http.port=" + port); - await().until(new Callable<Boolean>() { + TestFatJarRouter.main("--spring.main.sources=org.apache.camel.spring.boot.fatjarrouter.TestFatJarRouter", "--http.port=" + port); + await().atMost(1, TimeUnit.MINUTES).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { - new URL("http://localhost:" + port); + try { + new URL("http://localhost:" + port).openStream(); + } catch (ConnectException ex) { + return false; + } return true; } });