Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

several integration-test failure in native mode #2550

Closed
ffang opened this issue May 4, 2021 · 1 comment
Closed

several integration-test failure in native mode #2550

ffang opened this issue May 4, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@ffang
Copy link
Contributor

ffang commented May 4, 2021

I encountered test failures in integration-test for
file
hazelcast
minio
hbase
when running tests with -Pnative

For the hbase, since it's in extensions-jvm folder, IIUC, this means it supports jvm mode only, so I assume it shouldn't have native profile.

For the hazelcast, I got exceptions " java.lang.IllegalStateException: ICMP not supported in this platform: mac os x" on my mac. So I think disable it on mac should be sufficient

com.oracle.svm.core.util.UserError$UserException: Class initialization failed for com.hazelcast.internal.util.ICMPHelper. The class is requested for re-running (reason: Quarkus)
	at com.oracle.svm.core.util.UserError.abort(UserError.java:82)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.rerunInitialization(ConfigurableClassInitialization.java:385)
	at io.quarkus.runner.AutoFeature.beforeAnalysis(AutoFeature.zig:1155)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$7(NativeImageGenerator.java:701)
	at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:70)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:701)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:563)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
	at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.rerunInitialization(ConfigurableClassInitialization.java:383)
	... 12 more
Caused by: java.lang.IllegalStateException: ICMP not supported in this platform: mac os x
	at com.hazelcast.internal.util.ICMPHelper.getBundledLibraryPath(ICMPHelper.java:66)
	at com.hazelcast.internal.util.ICMPHelper.extractBundledLib(ICMPHelper.java:51)
	at com.hazelcast.internal.util.ICMPHelper.<clinit>(ICMPHelper.java:36)
	... 16 more

For the file, I constantly get the error like

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in org.apache.camel.quarkus.component.file.it.FileTest that uses java.nio.file.Path, java.nio.file.Pathjava.nio.file.Path, java.nio.file.Pathjava.lang.String was not fulfilled within 10 seconds.

For FileIT>FileTest.fileWatchCreateUpdate:74->FileTest.awaitEvent:136 » ConditionTimeout. But this seems to be a timing issue on my machine, change waiting time from 10 secs to 20 secs can fix it.

For the minio, I get error like

2021-05-04 09:58:00,872 WARN  [org.apa.cam.com.min.MinioConsumer] (Camel (camel-1) thread #0 - minio://mycamel) Consumer MinioConsumer[minio://mycamel?accessKey=testAccessKey&autoCreateBucket=true&destinationBucketName=camel-kafka-connector&minioClient=%23minioClient&moveAfterRead=true&secretKey=xxxxxx] failed polling endpoint: minio://mycamel?accessKey=testAccessKey&autoCreateBucket=true&destinationBucketName=camel-kafka-connector&minioClient=%23minioClient&moveAfterRead=true&secretKey=xxxxxx. Will try again at next poll. Caused by: [java.time.format.DateTimeParseException - Text 'Tue, 04 May 2021 13:57:51 GMT' could not be parsed at index 0]: java.time.format.DateTimeParseException: Text 'Tue, 04 May 2021 13:57:51 GMT' could not be parsed at index 0
	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2046)
	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1948)
	at java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
	at io.minio.StatObjectResponse.<init>(StatObjectResponse.java:50)
	at io.minio.MinioClient.statObject(MinioClient.java:968)
	at org.apache.camel.quarkus.component.minio.it.MinioClientProducer_ProducerMethod_produceMinioClient_a74f1d65447af9f0051b3615caa3aca9cac0ca25_ClientProxy.statObject(MinioClientProducer_ProducerMethod_produceMinioClient_a74f1d65447af9f0051b3615caa3aca9cac0ca25_ClientProxy.zig:2799)
	at org.apache.camel.component.minio.MinioEndpoint.getObjectStat(MinioEndpoint.java:212)

I'm not sure this is only on my machine or not. I believe the time format "Tue, 04 May 2021 13:57:51 GMT" meets the required pattern "EEE',' dd MMM yyyy HH':'mm':'ss 'GMT'"

@ffang ffang added the test label May 4, 2021
@ffang ffang self-assigned this May 4, 2021
ffang added a commit to ffang/camel-quarkus that referenced this issue May 4, 2021
ffang added a commit to ffang/camel-quarkus that referenced this issue May 4, 2021
ffang added a commit to ffang/camel-quarkus that referenced this issue May 4, 2021
@ffang
Copy link
Contributor Author

ffang commented May 4, 2021

For the minio integration test, the exception throws from io.minio.Time class when using

public static final DateTimeFormatter HTTP_HEADER_DATE_FORMAT =
      DateTimeFormatter.ofPattern("EEE',' dd MMM yyyy HH':'mm':'ss 'GMT'", Locale.US).withZone(UTC);

I strongly suspest in the quarkus native mode, somehow on my machine can't find Locale.US, instead it will use Locale.CA. So the expected time stamp should be "Mon., 03 May 2021 18:10:53 GMT" instead of "Mon, 03 May 2021 18:10:53 GMT", I found a related jdk issue here https://bugs.openjdk.java.net/browse/JDK-8211321

It turned out that we need to add

quarkus.native.user-country=US
quarkus.native.user-language=en

in to application.properties to make them same as the Locale used in minio(for those machines which system default Locale isn't en_US)

ffang added a commit to ffang/camel-quarkus that referenced this issue May 4, 2021
ffang added a commit to ffang/camel-quarkus that referenced this issue May 4, 2021
jamesnetherton pushed a commit that referenced this issue May 6, 2021
* fix file native integration-test #2550

* remove native profile for hbase since it only supports jvm mode

* remove native profile for hbase since it only supports jvm mode #2550

* fix hazelcast integration test #2550

* fix minio native integration-test #2550

* fix license header #2550
@ppalaga ppalaga added this to the 2.0.0-M1 milestone Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants