File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
core/src/main/java/org/testcontainers/dockerclient Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 3131import java .net .InetSocketAddress ;
3232import java .net .Socket ;
3333import java .net .SocketAddress ;
34- import java .net .SocketTimeoutException ;
3534import java .net .URI ;
3635import java .security .KeyManagementException ;
3736import java .security .KeyStoreException ;
@@ -207,14 +206,12 @@ protected boolean test() {
207206 }
208207
209208 try (Socket socket = socketProvider .call ()) {
210- Duration timeout = Duration .ofMillis (200 );
211209 Awaitility
212210 .await ()
213- .atMost (TestcontainersConfiguration .getInstance ().getClientPingTimeout (), TimeUnit .SECONDS )
214- .pollInterval (timeout )
211+ .atMost (TestcontainersConfiguration .getInstance ().getClientPingTimeout (), TimeUnit .SECONDS ) // timeout after configured duration
212+ .pollInterval (Duration . ofMillis ( 200 )) // check state every 200ms
215213 .pollDelay (Duration .ofSeconds (0 )) // start checking immediately
216- .ignoreExceptionsInstanceOf (SocketTimeoutException .class )
217- .untilAsserted (() -> socket .connect (socketAddress , (int ) timeout .toMillis ()));
214+ .untilAsserted (() -> socket .connect (socketAddress ));
218215 return true ;
219216 } catch (Exception e ) {
220217 log .warn ("DOCKER_HOST {} is not listening" , dockerHost , e );
You can’t perform that action at this time.
0 commit comments