Skip to content

Commit

Permalink
Merge pull request #241 from testcontainers/host-port-wait-test-stabi…
Browse files Browse the repository at this point in the history
…lize

Improve reliability of HostPortWaitStrategyTest
  • Loading branch information
rnorth committed Nov 13, 2016
2 parents d1e1978 + 58b9eff commit 90cc31b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class HostPortWaitStrategyTest extends AbstractWaitStrategyTest<HostPortW
*/
@Test
public void testWaitUntilReady_Success() {
waitUntilReadyAndSucceed("nc -lp 8080");
waitUntilReadyAndSucceed("while true; do nc -lp 8080; done");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class HttpWaitStrategyTest extends AbstractWaitStrategyTest<HttpWaitStrat
*/
@Test
public void testWaitUntilReady_Success() {
waitUntilReadyAndSucceed("echo -e \"HTTP/1.1 200 OK" + DOUBLE_NEWLINE + "\" | nc -lp 8080");
waitUntilReadyAndSucceed("while true; do echo -e \"HTTP/1.1 200 OK" + DOUBLE_NEWLINE + "\" | nc -lp 8080; done");
}

/**
Expand All @@ -32,7 +32,7 @@ public void testWaitUntilReady_Success() {
*/
@Test
public void testWaitUntilReady_Timeout() {
waitUntilReadyAndTimeout("echo -e \"HTTP/1.1 400 Bad Request" + DOUBLE_NEWLINE + "\" | nc -lp 8080");
waitUntilReadyAndTimeout("while true; do echo -e \"HTTP/1.1 400 Bad Request" + DOUBLE_NEWLINE + "\" | nc -lp 8080; done");
}

/**
Expand Down

0 comments on commit 90cc31b

Please sign in to comment.