Skip to content

Commit 2ddbcdc

Browse files
committed
fixup! STF-322: Add tests for transport-failure retry
1 parent 9aab603 commit 2ddbcdc

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

src/test/java/com/maxmind/minfraud/WebServiceClientTest.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import com.maxmind.minfraud.response.ScoreResponse;
4646
import java.net.InetAddress;
4747
import java.net.ProxySelector;
48-
import java.net.ServerSocket;
4948
import java.net.http.HttpClient;
5049
import java.time.Duration;
5150
import java.util.List;
@@ -508,26 +507,6 @@ public void testNoRetryOnHttpTimeoutException() {
508507
wireMock.verify(1, postRequestedFor(urlEqualTo(url)));
509508
}
510509

511-
@Test
512-
public void testRetriesOnConnectTimeout() throws Exception {
513-
// Deterministic alternative to an unroutable address: bind to a free
514-
// local port, then immediately close it. Connection attempts to the
515-
// closed port fail fast with ConnectException, which exercises the
516-
// same retry branch as a connect timeout (both are predicate hits).
517-
int port;
518-
try (ServerSocket socket = new ServerSocket(0)) {
519-
port = socket.getLocalPort();
520-
}
521-
522-
var client = new WebServiceClient.Builder(6, "0123456789")
523-
.host("127.0.0.1")
524-
.port(port)
525-
.disableHttps()
526-
.build();
527-
528-
assertThrows(Exception.class, () -> client.insights(fullTransaction()));
529-
}
530-
531510
@Test
532511
public void testNoRetryOn5xx() {
533512
var url = "/minfraud/v2.0/insights";

0 commit comments

Comments
 (0)