diff options
author | renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> | 2023-08-29 17:02:12 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-29 23:37:31 +0200 |
commit | 9ad528fdbc466133b67d55baadf1c01181cefea3 (patch) | |
tree | bf7b540188f9a64d99ac8b9f4cb6ff579c25dab1 /container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java | |
parent | 306dce28ed3cfa0d2f4679fd2519db3d1ac780c7 (diff) |
- Update dependency org.jvnet.mimepull:mimepull to v1.10.0
- Update dependency org.apache.opennlp:opennlp-tools to v1.9.4
- Use dependency-versions
- Bring jimfs up to date.
- Bring some more libraries up-2-date.
- Reduce usage of assertj
Diffstat (limited to 'container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java')
-rw-r--r-- | container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java index 99fa9bb2052..22699efbd46 100644 --- a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java +++ b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java @@ -21,7 +21,6 @@ import java.util.logging.Logger; import static com.yahoo.jdisc.http.server.jetty.Utils.createSslTestDriver; import static com.yahoo.jdisc.http.server.jetty.Utils.generatePrivateKeyAndCertificate; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -59,7 +58,7 @@ class SslHandshakeMetricsTest { verify(metricConsumer.mockitoMock(), atLeast(1)) .add(MetricDefinitions.SSL_HANDSHAKE_FAILURE_MISSING_CLIENT_CERT, 1L, MetricConsumerMock.STATIC_CONTEXT); assertTrue(driver.close()); - assertThat(connectionLog.logEntries()).hasSize(1); + assertEquals(1, connectionLog.logEntries().size()); assertSslHandshakeFailurePresent( connectionLog.logEntries().get(0), SSLHandshakeException.class, SslHandshakeFailure.MISSING_CLIENT_CERT.failureType()); } @@ -82,7 +81,7 @@ class SslHandshakeMetricsTest { verify(metricConsumer.mockitoMock(), atLeast(1)) .add(MetricDefinitions.SSL_HANDSHAKE_FAILURE_INCOMPATIBLE_PROTOCOLS, 1L, MetricConsumerMock.STATIC_CONTEXT); assertTrue(driver.close()); - assertThat(connectionLog.logEntries()).hasSize(1); + assertEquals(1, connectionLog.logEntries().size()); assertSslHandshakeFailurePresent( connectionLog.logEntries().get(0), SSLHandshakeException.class, SslHandshakeFailure.INCOMPATIBLE_PROTOCOLS.failureType()); } @@ -103,7 +102,7 @@ class SslHandshakeMetricsTest { verify(metricConsumer.mockitoMock(), atLeast(1)) .add(MetricDefinitions.SSL_HANDSHAKE_FAILURE_INCOMPATIBLE_CIPHERS, 1L, MetricConsumerMock.STATIC_CONTEXT); assertTrue(driver.close()); - assertThat(connectionLog.logEntries()).hasSize(1); + assertEquals(1, connectionLog.logEntries().size()); assertSslHandshakeFailurePresent( connectionLog.logEntries().get(0), SSLHandshakeException.class, SslHandshakeFailure.INCOMPATIBLE_CIPHERS.failureType()); } @@ -128,7 +127,7 @@ class SslHandshakeMetricsTest { verify(metricConsumer.mockitoMock(), atLeast(1)) .add(MetricDefinitions.SSL_HANDSHAKE_FAILURE_INVALID_CLIENT_CERT, 1L, MetricConsumerMock.STATIC_CONTEXT); assertTrue(driver.close()); - assertThat(connectionLog.logEntries()).hasSize(1); + assertEquals(1, connectionLog.logEntries().size()); assertSslHandshakeFailurePresent( connectionLog.logEntries().get(0), SSLHandshakeException.class, SslHandshakeFailure.INVALID_CLIENT_CERT.failureType()); } @@ -153,7 +152,7 @@ class SslHandshakeMetricsTest { verify(metricConsumer.mockitoMock(), atLeast(1)) .add(MetricDefinitions.SSL_HANDSHAKE_FAILURE_EXPIRED_CLIENT_CERT, 1L, MetricConsumerMock.STATIC_CONTEXT); assertTrue(driver.close()); - assertThat(connectionLog.logEntries()).hasSize(1); + assertEquals(1, connectionLog.logEntries().size()); } @@ -169,7 +168,7 @@ class SslHandshakeMetricsTest { client.get("/status.html"); fail("SSLHandshakeException expected"); } catch (SSLHandshakeException e) { - assertThat(e.getMessage()).contains(expectedExceptionSubstring); + assertTrue(e.getMessage().contains(expectedExceptionSubstring)); } catch (SocketException | SSLException e) { // This exception is thrown if Apache httpclient's write thread detects the handshake failure before the read thread. var msg = e.getMessage(); @@ -182,7 +181,7 @@ class SslHandshakeMetricsTest { private static void assertSslHandshakeFailurePresent( ConnectionLogEntry entry, Class<? extends SSLHandshakeException> expectedException, String expectedType) { - assertThat(entry.sslHandshakeFailure()).isPresent(); + assertTrue(entry.sslHandshakeFailure().isPresent()); ConnectionLogEntry.SslHandshakeFailure failure = entry.sslHandshakeFailure().get(); assertEquals(expectedType, failure.type()); ConnectionLogEntry.SslHandshakeFailure.ExceptionEntry exceptionEntry = failure.exceptionChain().get(0); |