mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
test(elbv2): avoid a scheduler-dependent timeout assertion (#7944)
Keep the stopped-listener timeout assertion without requiring multiple polls within 350 ms. Dedicated refusal and handshake tests still assert the retry behavior. Signed-off-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
1 parent
2d8cdeb343
commit
464e32fff4
1 file changed
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user