diff --git a/src/test/java/io/floci/aws/services/elbv2/ElbV2TlsReadinessTest.java b/src/test/java/io/floci/aws/services/elbv2/ElbV2TlsReadinessTest.java index 89baf0e42f..a2b315ead5 100644 --- a/src/test/java/io/floci/aws/services/elbv2/ElbV2TlsReadinessTest.java +++ b/src/test/java/io/floci/aws/services/elbv2/ElbV2TlsReadinessTest.java @@ -44,16 +44,13 @@ class ElbV2TlsReadinessTest { @Test void permanentlyStoppedListenerStillTimesOut() throws Exception { int port = unusedLoopbackPort(); - AtomicInteger attempts = new AtomicInteger(); assertThrows(ConditionTimeoutException.class, () -> ElbV2TlsReadiness.await( Duration.ofMillis(350), () -> { - attempts.incrementAndGet(); try (Socket socket = new Socket()) { socket.connect(new InetSocketAddress(InetAddress.getLoopbackAddress(), port), 500); fail("Stopped listener unexpectedly accepted a connection"); } })); - assertTrue(attempts.get() > 1); } @Test