mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-01 11:29:29 +00:00
Issue #5069 - Fixing assumeConnectTimeout test condition
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
65de149f84
commit
1b5268b511
2
pom.xml
2
pom.xml
@ -44,7 +44,7 @@
|
||||
<jpms-module-name>${bundle-symbolic-name}</jpms-module-name>
|
||||
|
||||
<!-- some maven plugins versions -->
|
||||
<maven.surefire.version>3.0.0-M4</maven.surefire.version>
|
||||
<maven.surefire.version>3.0.0-M5</maven.surefire.version>
|
||||
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
|
||||
<maven.dependency.plugin.version>3.1.1</maven.dependency.plugin.version>
|
||||
<maven.resources.plugin.version>3.1.0</maven.resources.plugin.version>
|
||||
|
@ -57,6 +57,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ArgumentsSource;
|
||||
import org.opentest4j.TestAbortedException;
|
||||
|
||||
import static org.eclipse.jetty.http.client.Transport.UNIX_SOCKET;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
@ -509,7 +510,7 @@ public class HttpClientTimeoutTest extends AbstractTest<TransportScenario>
|
||||
// connect to them will hang the connection attempt, which is
|
||||
// what we want to simulate in this test.
|
||||
socket.connect(new InetSocketAddress(host, port), connectTimeout);
|
||||
// Abort the test if we can connect.
|
||||
// Fail the test if we can connect.
|
||||
fail("Error: Should not have been able to connect to " + host + ":" + port);
|
||||
}
|
||||
catch (SocketTimeoutException x)
|
||||
@ -520,7 +521,7 @@ public class HttpClientTimeoutTest extends AbstractTest<TransportScenario>
|
||||
catch (Throwable x)
|
||||
{
|
||||
// Abort if any other exception happens.
|
||||
fail(x);
|
||||
throw new TestAbortedException("Not able to validate connect timeout conditions", x);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user