-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[native] Integration test "kafka-snappy" fails with GraalVM 20.3.1.2 #16129
Comments
/cc @cescoffier |
Snappy requires graalvm 21.+ because of serialization and method handle support. |
Thanks @cescoffier. In that case we need a way to detect that the test/app is relying on some unsupported feature and report it to the user. Then the test suite should ideally be able to either skip unsupported tests (based on the GraalVM/Mandrel version) or parse their output and mark them as passing if they fail with the expected message. |
that feature waited for Quarkus to switch to GraalVM 21+ as default and prevent using older versions. How did you end up having the issue? But yes, I agree that we should warn the user in the log, not only on the documentation. |
I am using this workflow https://github.com/zakkak/graalvm-quarkus-ci/blob/main/.github/workflows/quarkus.yml to test Quarkus main (and other versions) with various GraalVM versions, so running the workflow with 20.3 picked the test from |
ah ah.... yeah.... if you remove the safeguard, then :-D So there are multiple tasks:
|
In JUnit you can have arbitrary predicates. We could likely just check the GraalVM version and decide whether or not the test should be skipped |
Yes, and we have that code somewhere already (in the devtools) |
I gave diff --git a/integration-tests/kafka-snappy/src/test/java/io/quarkus/it/kafka/KafkaSnappyProducerTest.java b/integration-tests/kafka-snappy/src/test/java/io/quarkus/it/kafka/KafkaSnappyProducerTest.java
index b39aac6892..7330285d7e 100644
--- a/integration-tests/kafka-snappy/src/test/java/io/quarkus/it/kafka/KafkaSnappyProducerTest.java
+++ b/integration-tests/kafka-snappy/src/test/java/io/quarkus/it/kafka/KafkaSnappyProducerTest.java
@@ -13,10 +13,12 @@ import org.apache.kafka.common.serialization.IntegerDeserializer;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIf;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
+@DisabledIf(value = "graalVM20OrEarlier", disabledReason = "Kafka Snappy not working in GraalVM < 21.0")
@QuarkusTest
public class KafkaSnappyProducerTest {
@@ -33,6 +35,10 @@ public class KafkaSnappyProducerTest {
return consumer;
}
+ public static boolean graalVM20OrEarlier() {
+ return org.graalvm.home.Version.getCurrent().compareTo(21) < 0;
+ }
+
@Test
public void test() throws Exception {
KafkaConsumer<Integer, String> consumer = createConsumer(); The problem seems to be that the JUnit tests are being run using the hosts JVM which results in
|
I'll take a look next week and see what can be done |
#16236 takes care of it |
Disable kafka-snappy tests for versions of GraalVM older than 21.0
Describe the bug
Native image of integration test
kafka-snappy
fails with GraalVM 20.3.1.2Expected behavior
The native image test should pass.
Actual behavior
The native image test fails with:
To Reproduce
Environment (please complete the following information):
Output of
uname -a
orver
Linux 5.10.20-200.fc33.x86_64
Output of
java -version
11.0.10+9
GraalVM version (if different from Java)
20.3.1.2
Quarkus version or git rev
main
: 06e7f62Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.6.3
The text was updated successfully, but these errors were encountered: