From bd4cf3c8353a9952c9d90fd6b409345bd914a25e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 9 Feb 2023 18:10:22 +1000 Subject: [PATCH] Jetty 10 Upgrade to Hazelcast 5 and totally disable auto join multicast etc.. (fix build on CI) (#9331) * upgrade to hazelcast 5.2.1 Signed-off-by: Olivier Lamy + + + + + + + my-cluster + + hzInstance1 + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 46e6b78401b..15c71a33d46 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 5.1.0 2.2 2.15.2 - 4.2.5 + 5.2.1 4.6.0.Final 11.0.17.Final 2.14.1 diff --git a/tests/test-sessions/test-hazelcast-sessions/pom.xml b/tests/test-sessions/test-hazelcast-sessions/pom.xml index ded87d84513..9fbf017838e 100644 --- a/tests/test-sessions/test-hazelcast-sessions/pom.xml +++ b/tests/test-sessions/test-hazelcast-sessions/pom.xml @@ -43,8 +43,15 @@ org.apache.maven.plugins maven-surefire-plugin - --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED + + --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED + --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED + true + + com.hazelcast.logging.Slf4jFactory + 45 240 @@ -76,16 +83,10 @@ org.eclipse.jetty jetty-hazelcast test - - - com.hazelcast - hazelcast - - com.hazelcast - hazelcast-all + hazelcast ${hazelcast.version} diff --git a/tests/test-sessions/test-hazelcast-sessions/src/test/java/org/eclipse/jetty/hazelcast/session/HazelcastTestHelper.java b/tests/test-sessions/test-hazelcast-sessions/src/test/java/org/eclipse/jetty/hazelcast/session/HazelcastTestHelper.java index 7a1d6ad8e0b..901d75099cc 100644 --- a/tests/test-sessions/test-hazelcast-sessions/src/test/java/org/eclipse/jetty/hazelcast/session/HazelcastTestHelper.java +++ b/tests/test-sessions/test-hazelcast-sessions/src/test/java/org/eclipse/jetty/hazelcast/session/HazelcastTestHelper.java @@ -19,10 +19,7 @@ import com.hazelcast.client.HazelcastClient; import com.hazelcast.client.config.ClientConfig; import com.hazelcast.client.config.ClientNetworkConfig; import com.hazelcast.config.Config; -import com.hazelcast.config.JoinConfig; import com.hazelcast.config.MapConfig; -import com.hazelcast.config.MulticastConfig; -import com.hazelcast.config.NetworkConfig; import com.hazelcast.config.SerializerConfig; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; @@ -45,9 +42,6 @@ public class HazelcastTestHelper static { - // Wire up hazelcast logging to slf4j - System.setProperty("hazelcast.logging.class", "com.hazelcast.logging.Slf4jFactory"); - // Wire up java.util.logging (used by hazelcast libs) to slf4j. if (!org.slf4j.bridge.SLF4JBridgeHandler.isInstalled()) { @@ -57,7 +51,7 @@ public class HazelcastTestHelper _serializerConfig = new SerializerConfig().setImplementation(new SessionDataSerializer()).setTypeClass(SessionData.class); Config config = new Config(); config.setInstanceName(_hazelcastInstanceName); - config.setNetworkConfig(new NetworkConfig().setJoin(new JoinConfig().setMulticastConfig(new MulticastConfig().setEnabled(false)))); + config.getNetworkConfig().getJoin().getAutoDetectionConfig().setEnabled(false); config.addMapConfig(new MapConfig().setName(_name)).setClassLoader(null); config.getSerializationConfig().addSerializerConfig(_serializerConfig); _instance = Hazelcast.getOrCreateHazelcastInstance(config);