From 11fe7755c2ead3467c43667655162cb7746b4077 Mon Sep 17 00:00:00 2001 From: alex-butcher <21243172+abutch3r@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:00:20 +0100 Subject: [PATCH 1/7] Disable SASL Tests for Java versions >21 The Kafka Client's SASL code uses the Java security, which as of Java 23 now throws exceptions if used. there is currently no Kafka Client version that does not use Security Manager. To allow for the rest of the RM suite of tests to continue passing without the failing Java 23 build, set the maximum java level to 21. This limitation should be removed once a suitable client is available and included. --- .../fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java | 2 ++ .../fat/kafka/liberty_login/LibertyLoginModuleTest.java | 2 ++ .../kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java | 2 ++ .../special_chars/LibertyLoginModuleSpecialCharsTest.java | 2 ++ .../fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java | 2 ++ .../messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java | 2 ++ 6 files changed, 12 insertions(+) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java index 34fce448f1b..eaecbbfc3c5 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Properties; +import componenttest.annotation.MaximumJavaLevel; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.AfterClass; @@ -60,6 +61,7 @@ * Basic test using a kafka broker with TLS enabled */ @RunWith(FATRunner.class) +@MaximumJavaLevel(javaLevel = 21) @CheckpointTest public class CheckpointKafkaSaslPlainTest { diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java index 283dbd0a7fd..7e220eb0cd9 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java @@ -19,6 +19,7 @@ import java.util.Collections; import java.util.Map; +import componenttest.annotation.MaximumJavaLevel; import org.apache.kafka.common.config.SaslConfigs; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; @@ -48,6 +49,7 @@ * Test the login module with an aes encoded password and configured encryption key */ @RunWith(FATRunner.class) +@MaximumJavaLevel(javaLevel = 21) public class LibertyLoginModuleTest { private static final String APP_NAME = "kafkaLoginModuleTest"; diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java index baaf009f3e4..611885dbaa9 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java @@ -18,6 +18,7 @@ import java.util.Map; +import componenttest.annotation.MaximumJavaLevel; import org.apache.kafka.common.config.SaslConfigs; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; @@ -44,6 +45,7 @@ /** * Test the login module with an unencoded password - should still work */ +@MaximumJavaLevel(javaLevel = 21) @RunWith(FATRunner.class) public class LibertyLoginModuleNoEncTest { diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java index 93fbe4c42d4..9aa4412dd86 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java @@ -18,6 +18,7 @@ import java.util.Map; +import componenttest.annotation.MaximumJavaLevel; import org.apache.kafka.common.config.SaslConfigs; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; @@ -44,6 +45,7 @@ /** * Test the login module with an unencoded password - should still work */ +@MaximumJavaLevel(javaLevel = 21) @RunWith(FATRunner.class) public class LibertyLoginModuleSpecialCharsTest { diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java index c06754905b1..f5637f6718a 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java @@ -18,6 +18,7 @@ import java.util.Map; +import componenttest.annotation.MaximumJavaLevel; import org.apache.kafka.common.config.SaslConfigs; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; @@ -48,6 +49,7 @@ * Test the login module with xor encoded password */ @RunWith(FATRunner.class) +@MaximumJavaLevel(javaLevel = 21) @Mode(TestMode.FULL) public class LibertyLoginModuleXorTest { diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java index d13fe37d6bd..b7d6f575190 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java @@ -16,6 +16,7 @@ import static com.ibm.ws.microprofile.reactive.messaging.fat.kafka.common.KafkaUtils.kafkaPermissions; import static com.ibm.ws.microprofile.reactive.messaging.fat.kafka.common.KafkaUtils.kafkaStopServer; +import componenttest.annotation.MaximumJavaLevel; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.AfterClass; @@ -45,6 +46,7 @@ * Basic test using a kafka broker with TLS enabled */ @RunWith(FATRunner.class) +@MaximumJavaLevel(javaLevel = 21) public class KafkaSaslPlainTest { private static final String APP_NAME = "kafkaSaslTest"; From 15d3532e747103301edebc17c431f5237cd376bc Mon Sep 17 00:00:00 2001 From: Greg Watts <18669115+gjwatts@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:22:29 -0500 Subject: [PATCH 2/7] Allow FATs to run at Java 22 --- .../fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java index eaecbbfc3c5..29dda8e9b3e 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/checkpoint/CheckpointKafkaSaslPlainTest.java @@ -61,7 +61,7 @@ * Basic test using a kafka broker with TLS enabled */ @RunWith(FATRunner.class) -@MaximumJavaLevel(javaLevel = 21) +@MaximumJavaLevel(javaLevel = 22) @CheckpointTest public class CheckpointKafkaSaslPlainTest { From 07b9350a6eb50cc5287e462b986972ab651c3f5b Mon Sep 17 00:00:00 2001 From: Greg Watts <18669115+gjwatts@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:22:44 -0500 Subject: [PATCH 3/7] Allow FATs to run at Java 22 --- .../fat/kafka/liberty_login/LibertyLoginModuleTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java index 7e220eb0cd9..f303156ded3 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/LibertyLoginModuleTest.java @@ -49,7 +49,7 @@ * Test the login module with an aes encoded password and configured encryption key */ @RunWith(FATRunner.class) -@MaximumJavaLevel(javaLevel = 21) +@MaximumJavaLevel(javaLevel = 22) public class LibertyLoginModuleTest { private static final String APP_NAME = "kafkaLoginModuleTest"; From 430ab52069c477d15345ac40d4969c0a11398770 Mon Sep 17 00:00:00 2001 From: Greg Watts <18669115+gjwatts@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:22:56 -0500 Subject: [PATCH 4/7] Allow FATs to run at Java 22 --- .../kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java index 611885dbaa9..29d4689fc61 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/none/LibertyLoginModuleNoEncTest.java @@ -45,7 +45,7 @@ /** * Test the login module with an unencoded password - should still work */ -@MaximumJavaLevel(javaLevel = 21) +@MaximumJavaLevel(javaLevel = 22) @RunWith(FATRunner.class) public class LibertyLoginModuleNoEncTest { From fc7438d01c3b65fd6773bb68b8f5dc3b6b8bca4d Mon Sep 17 00:00:00 2001 From: Greg Watts <18669115+gjwatts@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:23:09 -0500 Subject: [PATCH 5/7] Allow FATs to run at Java 22 --- .../special_chars/LibertyLoginModuleSpecialCharsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java index 9aa4412dd86..b56f5649958 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/special_chars/LibertyLoginModuleSpecialCharsTest.java @@ -45,7 +45,7 @@ /** * Test the login module with an unencoded password - should still work */ -@MaximumJavaLevel(javaLevel = 21) +@MaximumJavaLevel(javaLevel = 22) @RunWith(FATRunner.class) public class LibertyLoginModuleSpecialCharsTest { From 78c9ada29faae145b299640e23311db713f74085 Mon Sep 17 00:00:00 2001 From: Greg Watts <18669115+gjwatts@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:23:20 -0500 Subject: [PATCH 6/7] Allow FATs to run at Java 22 --- .../fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java index f5637f6718a..87c547dedb1 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/liberty_login/xor/LibertyLoginModuleXorTest.java @@ -49,7 +49,7 @@ * Test the login module with xor encoded password */ @RunWith(FATRunner.class) -@MaximumJavaLevel(javaLevel = 21) +@MaximumJavaLevel(javaLevel = 22) @Mode(TestMode.FULL) public class LibertyLoginModuleXorTest { From 63c8ed6910ece2bab5ac2b7de0acde4f44830e12 Mon Sep 17 00:00:00 2001 From: Greg Watts <18669115+gjwatts@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:23:32 -0500 Subject: [PATCH 7/7] Allow FATs to run at Java 22 --- .../messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java index b7d6f575190..798a0028140 100644 --- a/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java +++ b/dev/com.ibm.ws.microprofile.reactive.messaging_fat/fat/src/com/ibm/ws/microprofile/reactive/messaging/fat/kafka/sasl_plain/KafkaSaslPlainTest.java @@ -46,7 +46,7 @@ * Basic test using a kafka broker with TLS enabled */ @RunWith(FATRunner.class) -@MaximumJavaLevel(javaLevel = 21) +@MaximumJavaLevel(javaLevel = 22) public class KafkaSaslPlainTest { private static final String APP_NAME = "kafkaSaslTest";