Repository: camel
Updated Branches:
  refs/heads/master e0bcc700c -> 2d1c39329


Refactoring.


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

Branch: refs/heads/master
Commit: 2d1c393291d49b08c6f646315f00f1459c80e69a
Parents: e0bcc70
Author: Henryk Konsek <[email protected]>
Authored: Sun Feb 15 22:32:10 2015 +0100
Committer: Henryk Konsek <[email protected]>
Committed: Sun Feb 15 22:32:10 2015 +0100

----------------------------------------------------------------------
 .../boot/fatjarrouter/StandaloneFatJarRouterTest.java     | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2d1c3932/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 4ee21ae..5576fa1 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
@@ -20,7 +20,8 @@ import java.io.IOException;
 import java.net.ConnectException;
 import java.net.URL;
 import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
+
+import static java.util.concurrent.TimeUnit.MINUTES;
 
 import org.apache.commons.io.IOUtils;
 import org.junit.Assert;
@@ -35,12 +36,13 @@ public class StandaloneFatJarRouterTest extends Assert {
     public void shouldStartCamelRoute() throws InterruptedException, 
IOException {
         // Given
         final int port = SocketUtils.findAvailableTcpPort();
+        final URL httpEndpoint = new URL("http://localhost:"; + port);
         
TestFatJarRouter.main("--spring.main.sources=org.apache.camel.spring.boot.fatjarrouter.TestFatJarRouter",
 "--http.port=" + port);
-        await().atMost(1, TimeUnit.MINUTES).until(new Callable<Boolean>() {
+        await().atMost(1, MINUTES).until(new Callable<Boolean>() {
             @Override
             public Boolean call() throws Exception {
                 try {
-                    new URL("http://localhost:"; + port).openStream();
+                    httpEndpoint.openStream();
                 } catch (ConnectException ex) {
                     return false;
                 }
@@ -49,7 +51,7 @@ public class StandaloneFatJarRouterTest extends Assert {
         });
 
         // When
-        String response = IOUtils.toString(new URL("http://localhost:"; + 
port));
+        String response = IOUtils.toString(httpEndpoint);
 
         // Then
         assertEquals("stringBean", response);

Reply via email to