Issue #5069 - Fixing assumeConnectTimeout test condition

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2020-07-21 16:04:27 -05:00
parent 65de149f84
commit 1b5268b511
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
2 changed files with 4 additions and 3 deletions

View File

@ -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>

View File

@ -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);
}
}