From 5177e1caa6f91e8b8fad2995b35b378fb4ac2e90 Mon Sep 17 00:00:00 2001 From: Stefan Miklosovic Date: Thu, 27 Jun 2024 12:52:54 +0200 Subject: [PATCH] fix TestSslContextFactory --- .../exporter/netty/ssl/TestSslContextFactory.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/src/test/java/com/zegelin/cassandra/exporter/netty/ssl/TestSslContextFactory.java b/common/src/test/java/com/zegelin/cassandra/exporter/netty/ssl/TestSslContextFactory.java index 95a08ca..b41a44d 100644 --- a/common/src/test/java/com/zegelin/cassandra/exporter/netty/ssl/TestSslContextFactory.java +++ b/common/src/test/java/com/zegelin/cassandra/exporter/netty/ssl/TestSslContextFactory.java @@ -7,7 +7,6 @@ import io.netty.handler.ssl.util.SelfSignedCertificate; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import sun.security.ssl.SSLEngineImpl; import java.io.File; import java.io.IOException; @@ -46,7 +45,7 @@ public void testCreateJdkSslContext() { SslContext context = contextFactory.createSslContext(); - assertThat(context.newEngine(ByteBufAllocator.DEFAULT)).isInstanceOf(SSLEngineImpl.class); + assertThat(context.newEngine(ByteBufAllocator.DEFAULT).getClass().getSimpleName()).isEqualTo("SSLEngineImpl"); } @Test @@ -163,7 +162,7 @@ public void testCreateSslContextWithServerKeyAndCert() { SslContext context = contextFactory.createSslContext(); - assertThat(context.newEngine(ByteBufAllocator.DEFAULT)).isInstanceOf(SSLEngineImpl.class); + assertThat(context.newEngine(ByteBufAllocator.DEFAULT).getClass().getSimpleName()).isEqualTo("SSLEngineImpl"); } @Test @@ -175,7 +174,7 @@ public void testCreateSslContextWithServerKeyAndCertWithPassword() { SslContext context = contextFactory.createSslContext(); - assertThat(context.newEngine(ByteBufAllocator.DEFAULT)).isInstanceOf(SSLEngineImpl.class); + assertThat(context.newEngine(ByteBufAllocator.DEFAULT).getClass().getSimpleName()).isEqualTo("SSLEngineImpl"); } @Test