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 31
31
import java .net .InetSocketAddress ;
32
32
import java .net .Socket ;
33
33
import java .net .SocketAddress ;
34
- import java .net .SocketTimeoutException ;
35
34
import java .net .URI ;
36
35
import java .security .KeyManagementException ;
37
36
import java .security .KeyStoreException ;
@@ -207,14 +206,12 @@ protected boolean test() {
207
206
}
208
207
209
208
try (Socket socket = socketProvider .call ()) {
210
- Duration timeout = Duration .ofMillis (200 );
211
209
Awaitility
212
210
.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
215
213
.pollDelay (Duration .ofSeconds (0 )) // start checking immediately
216
- .ignoreExceptionsInstanceOf (SocketTimeoutException .class )
217
- .untilAsserted (() -> socket .connect (socketAddress , (int ) timeout .toMillis ()));
214
+ .untilAsserted (() -> socket .connect (socketAddress ));
218
215
return true ;
219
216
} catch (Exception e ) {
220
217
log .warn ("DOCKER_HOST {} is not listening" , dockerHost , e );
You can’t perform that action at this time.
0 commit comments