diff --git a/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusTest.java b/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusTest.java index f5bf65d3..db9c8759 100644 --- a/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusTest.java +++ b/testsuite/src/it/java/io/quarkus/ts/startstop/CodeQuarkusTest.java @@ -201,6 +201,11 @@ public void supportedExtensionsSubsetD(TestInfo testInfo) throws Exception { testRuntime(testInfo, supportedEx.get(3), MvnCmds.MVNW_DEV); } + @Test + public void supportedRestEasyClassicExtensions(TestInfo testInfo) throws Exception { + testRuntime(testInfo, CodeQuarkusExtensions.getRestEasyClassicExtensions(), MvnCmds.MVNW_DEV); + } + @Test public void notSupportedExtensionsSubsetA(TestInfo testInfo) throws Exception { testRuntime(testInfo, notSupportedEx.get(0).subList(0, Math.min(10, notSupportedEx.get(0).size())), MvnCmds.MVNW_DEV); diff --git a/testsuite/src/it/java/io/quarkus/ts/startstop/utils/CodeQuarkusExtensions.java b/testsuite/src/it/java/io/quarkus/ts/startstop/utils/CodeQuarkusExtensions.java index db7dc946..6de71713 100644 --- a/testsuite/src/it/java/io/quarkus/ts/startstop/utils/CodeQuarkusExtensions.java +++ b/testsuite/src/it/java/io/quarkus/ts/startstop/utils/CodeQuarkusExtensions.java @@ -1,6 +1,7 @@ package io.quarkus.ts.startstop.utils; import java.util.ArrayList; +import java.util.EnumSet; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -18,25 +19,20 @@ public enum CodeQuarkusExtensions { QUARKUS_REST_CLIENT_REACTIVE_JAXB("quarkus-rest-client-jaxb", "REST Client JAXB", "ignored", true), QUARKUS_REST_CLIENT_REACTIVE_JSONB("quarkus-rest-client-jsonb", "REST Client JSON-B", "ignored", true), QUARKUS_REST_CLIENT_REACTIVE_KOTLIN_SERIALIZATION("quarkus-rest-client-kotlin-serialization", "REST Client Kotlin Serialization", "ignored", false), - // Should be directly in RESTEasy Reactive - // QUARKUS_CSRF_REACTIVE("quarkus-csrf-reactive", "Cross-Site Request Forgery Prevention Filter Reactive", "ignored", false), + QUARKUS_REST_CSRF("quarkus-rest-csrf", "Quarkus REST Cross-Site Request Forgery Prevention Filter", "ignored", false), QUARKUS_OIDC_CLIENT_REACTIVE_FILTER("quarkus-rest-client-oidc-filter", "REST Client - OpenID Connect Filter", "ignored", true), QUARKUS_OIDC_TOKEN_PROPAGATION_REACTIVE("quarkus-rest-client-oidc-token-propagation", "REST Client - OpenID Connect Token Propagation", "ignored", false), - // TODO Introduce buckets with non reactive jakarta-rest extensions - // To avoid java.lang.IllegalStateException: The 'quarkus-resteasy-reactive' and 'quarkus-resteasy' extensions cannot be used at the same time. -// QUARKUS_RESTEASY("quarkus-resteasy", "RESTEasy Jakarta REST", "98e", true), -// QUARKUS_RESTEASY_JACKSON("quarkus-resteasy-jackson", "RESTEasy Jackson", "pV1", true), -// QUARKUS_RESTEASY_JSONB("quarkus-resteasy-jsonb", "RESTEasy JSON-B", "49J", true), -// QUARKUS_RESTEASY_JAXB("quarkus-resteasy-jaxb", "RESTEasy JAXB", "d7W", true), -// QUARKUS_RESTEASY_MULTIPART("quarkus-resteasy-multipart", "RESTEasy Multipart", "kV0", true), -// QUARKUS_RESTEASY_LINKS("quarkus-resteasy-links", "RESTEasy Links", "rK1", false), -// QUARKUS_REST_CLIENT_MUTINY("quarkus-rest-client-mutiny", "Mutiny support for REST Client", "Ph0", false), -// QUARKUS_REST_CLIENT("quarkus-rest-client", "REST Client", "ekA", true), -// QUARKUS_REST_CLIENT_JAXB("quarkus-rest-client-jaxb", "REST Client JAXB", "8iY", true), -// QUARKUS_REST_CLIENT_JSONB("quarkus-rest-client-jsonb", "REST Client JSON-B", "Q3z", true), -// QUARKUS_REST_CLIENT_JACKSON("quarkus-rest-client-jackson", "REST Client Jackson", "pJg", true), -// QUARKUS_OIDC_CLIENT_FILTER("quarkus-oidc-client-filter", "OpenID Connect Client Filter", "T0U", true), + QUARKUS_RESTEASY("quarkus-resteasy", "RESTEasy Jakarta REST", "98e", true, true), + QUARKUS_RESTEASY_JACKSON("quarkus-resteasy-jackson", "RESTEasy Jackson", "pV1", true, true), + QUARKUS_RESTEASY_JSONB("quarkus-resteasy-jsonb", "RESTEasy JSON-B", "49J", true, true), + QUARKUS_RESTEASY_JAXB("quarkus-resteasy-jaxb", "RESTEasy JAXB", "d7W", true, true), + QUARKUS_RESTEASY_MULTIPART("quarkus-resteasy-multipart", "RESTEasy Multipart", "kV0", true, true), + QUARKUS_RESTEASY_CLIENT("quarkus-resteasy-client", "REST Client", "ekA", true, true), + QUARKUS_RESTEASY_CLIENT_JAXB("quarkus-resteasy-client-jaxb", "REST Client JAXB", "8iY", true, true), + QUARKUS_RESTEASY_CLIENT_JSONB("quarkus-resteasy-client-jsonb", "REST Client JSON-B", "Q3z", true, true), + QUARKUS_RESTEASY_CLIENT_JACKSON("quarkus-resteasy-client-jackson", "REST Client Jackson", "pJg", true, true), + QUARKUS_RESTEASY_CLIENT_OIDC_FILTER("quarkus-resteasy-client-oidc-filter", "OpenID Connect Client Filter", "T0U", true, true), QUARKUS_VERTX_GRAPHQL("quarkus-vertx-graphql", "Eclipse Vert.x GraphQL", "F9R", false), QUARKUS_HIBERNATE_VALIDATOR("quarkus-hibernate-validator", "Hibernate Validator", "YjV", true), @@ -74,12 +70,8 @@ public enum CodeQuarkusExtensions { // The Blaze-Persistence dependency is present but no persistence units have been defined. // BLAZE_PERSISTENCE_INTEGRATION_QUARKUS("blaze-persistence-integration-quarkus", "Blaze-Persistence", "weW", false), QUARKUS_CACHE("quarkus-cache", "Cache", "W1i", true), - // https://issues.redhat.com/browse/QUARKUS-1295 -// QUARKUS_ELASTICSEARCH_REST_HIGH_LEVEL_CLIENT("quarkus-elasticsearch-rest-high-level-client", "Elasticsearch REST High Level Client", "OJe", false), QUARKUS_ELASTICSEARCH_REST_CLIENT("quarkus-elasticsearch-rest-client", "Elasticsearch REST client", "NhW", false), QUARKUS_FLYWAY("quarkus-flyway", "Flyway", "wTM", false), - // TODO Not present in the 3.0 platform -// QUARKUS_HAZELCAST_CLIENT("quarkus-hazelcast-client", "Hazelcast Client", "yii", false), QUARKUS_HIBERNATE_ENVERS("quarkus-hibernate-envers", "Hibernate Envers", "8j9", false), QUARKUS_HIBERNATE_ORM_PANACHE_KOTLIN("quarkus-hibernate-orm-panache-kotlin", "Hibernate ORM with Panache and Kotlin", "O3q", false), QUARKUS_HIBERNATE_REACTIVE("quarkus-hibernate-reactive", "Hibernate Reactive", "r1s", false), @@ -98,8 +90,6 @@ public enum CodeQuarkusExtensions { // Caused by: java.lang.IllegalStateException: 'quarkus-narayana-lra' can only work if 'quarkus-resteasy-jackson' or 'quarkus-resteasy-reactive-jackson' is present // QUARKUS_NARAYANA_LRA("quarkus-narayana-lra", "Narayana LRA - LRA Participant Support", "O8P", false), QUARKUS_NARAYANA_STM("quarkus-narayana-stm", "Narayana STM - Software Transactional Memory", "Nl9", false), - // https://issues.redhat.com/browse/QUARKUS-1294 -// QUARKUS_REDIS_CLIENT("quarkus-redis-client", "Redis Client", "jlX", false), QUARKUS_MESSAGING("quarkus-messaging", "Messaging", "ignored", true), // https://github.com/quarkusio/quarkus/issues/23383 // QUARKUS_SMALLRYE_REACTIVE_MESSAGING_AMQP("quarkus-smallrye-reactive-messaging-amqp", "SmallRye Reactive Messaging - AMQP Connector", "ur3", true), @@ -443,12 +433,22 @@ public enum CodeQuarkusExtensions { public final String name; public final String shortId; public final boolean supported; + private final boolean onlyRestEasyClassicBucket; CodeQuarkusExtensions(String id, String name, String shortId, boolean supported) { this.id = id; this.name = name; this.shortId = shortId; this.supported = supported; + this.onlyRestEasyClassicBucket = false; + } + + CodeQuarkusExtensions(String id, String name, String shortId, boolean supported, boolean onlyRestEasyClassicBucket) { + this.id = id; + this.name = name; + this.shortId = shortId; + this.supported = supported; + this.onlyRestEasyClassicBucket = onlyRestEasyClassicBucket; } public enum Flag { @@ -461,7 +461,9 @@ public static List> partition(int buckets, Flag flag if (buckets < 1) { throw new IllegalArgumentException("Nope, buckets must be bigger than 0."); } - List extensions = Stream.of(CodeQuarkusExtensions.values()).filter(x -> + List extensions = Stream.of(CodeQuarkusExtensions.values()) + .filter(x -> !x.onlyRestEasyClassicBucket) // RESTEasy Classic has a separate bucket + .filter(x -> flag == Flag.SUPPORTED && x.supported || flag == Flag.NOT_SUPPORTED && !x.supported || flag == Flag.MIXED).collect(Collectors.toUnmodifiableList()); @@ -485,4 +487,8 @@ public static List> partition(int buckets, Flag flag } return result; } + + public static List getRestEasyClassicExtensions() { + return EnumSet.allOf(CodeQuarkusExtensions.class).stream().filter(x -> x.onlyRestEasyClassicBucket).toList(); + } }