This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new fa00983   fix hazelcast integration-test failed in native mode(On Mac) 
#2719 (#2789)
fa00983 is described below

commit fa00983fb5d117284ddf9d5dcd36c7fc876a964c
Author: Freeman(Yue) Fang <[email protected]>
AuthorDate: Thu Jun 17 09:27:20 2021 -0400

     fix hazelcast integration-test failed in native mode(On Mac) #2719 (#2789)
---
 .../hazelcast/deployment/HazelcastProcessor.java         | 12 ++++++++++++
 integration-tests/hazelcast/pom.xml                      | 16 ++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git 
a/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
 
b/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
index 9b02753..f255b7c 100644
--- 
a/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
+++ 
b/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
@@ -43,6 +43,7 @@ import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
+import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
 import org.apache.camel.tooling.model.MainModel;
 import org.jboss.jandex.DotName;
 import org.jboss.jandex.Type;
@@ -51,12 +52,23 @@ class HazelcastProcessor {
 
     private static final String FEATURE = "camel-hazelcast";
 
+    private static final String[] RUNTIME_INITIALIZED_CLASSES = new String[] {
+            "com.hazelcast.internal.util.ICMPHelper"
+    };
+
     @BuildStep
     FeatureBuildItem feature() {
         return new FeatureBuildItem(FEATURE);
     }
 
     @BuildStep
+    void 
configureRuntimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem>
 runtimeInitializedClass) {
+        for (String className : RUNTIME_INITIALIZED_CLASSES) {
+            runtimeInitializedClass.produce(new 
RuntimeInitializedClassBuildItem(className));
+        }
+    }
+
+    @BuildStep
     ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         return new ExtensionSslNativeSupportBuildItem(FEATURE);
     }
diff --git a/integration-tests/hazelcast/pom.xml 
b/integration-tests/hazelcast/pom.xml
index 8344e00..68a8520 100644
--- a/integration-tests/hazelcast/pom.xml
+++ b/integration-tests/hazelcast/pom.xml
@@ -134,5 +134,21 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <!--this profile should be removed once 
https://github.com/apache/camel-quarkus/issues/2800
+                or 
https://github.com/hazelcast/quarkus-hazelcast-client/issues/189 get resolved
+            -->
+            <id>hazelcast-mac</id>
+            <activation>
+                <os><family>mac</family></os>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>net.openhft</groupId>
+                    <artifactId>affinity</artifactId>
+                    <version>3.20.0</version>
+                </dependency>
+            </dependencies>
+        </profile>
     </profiles>
 </project>

Reply via email to