From b7bc12fc8ac348eaef67e73a37d8554e2effd860 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sun, 20 Aug 2023 21:49:55 -0400 Subject: [PATCH 01/36] [WFLY-18332] The testsuite/layers test should only test wildfly-ee content or wildfly-preview layers also defined in wildfly-ee --- testsuite/layers/pom.xml | 65 ++----------------- .../as/test/layers/base/LayersTestCase.java | 10 +++ 2 files changed, 16 insertions(+), 59 deletions(-) diff --git a/testsuite/layers/pom.xml b/testsuite/layers/pom.xml index 8605b73160aa..c03dc80c03b3 100644 --- a/testsuite/layers/pom.xml +++ b/testsuite/layers/pom.xml @@ -70,9 +70,12 @@ ${jbossas.ts.dir}/../.. + using alternative feature packs. + By default we test the wildfly-ee feature pack as all the layers we test + in this module are from that feature pack. + --> ${testsuite.ee.galleon.pack.groupId} - ${testsuite.ee.galleon.pack.artifactId} + wildfly-ee-galleon-pack ${testsuite.ee.galleon.pack.version} @@ -790,7 +793,7 @@ provision - ${provisioning.phase} + ${provisioning.phase.preview.excluded} ${layers.install.dir}/test-standalone-reference @@ -1837,34 +1840,6 @@ - - opentelemetry-provisioning - - provision - - ${provisioning.phase} - - ${layers.install.dir}/opentelemetry - - - ${ee.feature.pack.groupId} - ${ee.feature.pack.artifactId} - ${ee.feature.pack.version} - false - false - - - - - standalone - standalone.xml - - opentelemetry - - - - - pojo-provisioning @@ -2190,7 +2165,6 @@ mod_cluster naming observability - opentelemetry pojo remoting request-controller @@ -2206,22 +2180,6 @@ web-console web-server webservices - - microprofile-config - microprofile-fault-tolerance - microprofile-health - microprofile-jwt - microprofile-lra-coordinator - microprofile-lra-participant - microprofile-openapi - microprofile-reactive-streams-operators - microprofile-reactive-messaging - microprofile-reactive-messaging-kafka - microprofile-rest-client - microprofile-telemetry - microprofile-platform @@ -2294,7 +2252,6 @@ mod_cluster naming observability - opentelemetry pojo remote-activemq remoting @@ -2311,16 +2268,6 @@ web-console web-server webservices - - microprofile-config - microprofile-fault-tolerance - microprofile-health - microprofile-jwt - microprofile-openapi - microprofile-telemetry - microprofile-platform jpa diff --git a/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java b/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java index e6f89dd8ef6f..77c2fba72970 100644 --- a/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java +++ b/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java @@ -5,8 +5,10 @@ package org.jboss.as.test.layers.base; +import org.jboss.as.test.layers.LayersTest; import org.jboss.as.test.shared.LayersTestBase; import org.jboss.as.test.shared.util.AssumeTestGroupUtil; +import org.junit.Test; public class LayersTestCase extends LayersTestBase { @@ -22,4 +24,12 @@ public void test() throws Exception { super.test(); } + + @Test + public void testLayers() throws Exception { + // Since we don't run 'test()' with WFP, which among other things + // checks the execution of the layers, do it directly + AssumeTestGroupUtil.assumeWildFlyPreview(); + LayersTest.testExecution(root); + } } From dd9f040a9cc46bf419bd4907749b0851192098dd Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 20:40:49 -0400 Subject: [PATCH 02/36] [WFLY-18332] Use distinct sets of unused/unreferenced modules for LayersTestCase tests of wildfly-ee, wildfly and wildfly-preview feature packs --- .../test/layers/expansion/LayersTestCase.java | 24 +- .../as/test/layers/base/LayersTestCase.java | 19 ++ .../jboss/as/test/shared/LayersTestBase.java | 249 ++++++++++-------- 3 files changed, 184 insertions(+), 108 deletions(-) diff --git a/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java b/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java index 4a921c4be15b..69b63c7bb622 100644 --- a/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java +++ b/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java @@ -4,9 +4,29 @@ */ package org.jboss.as.test.layers.expansion; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import org.jboss.as.test.shared.LayersTestBase; +import org.jboss.as.test.shared.util.AssumeTestGroupUtil; public class LayersTestCase extends LayersTestBase { - // Currently we get all functionality from the superclass; this class is just so surefire has something to run - // in this testsuite module + + protected Set getExpectedUnreferenced() { + String[] extra = AssumeTestGroupUtil.isWildFlyPreview() ? NOT_REFERENCED_WILDFLY_PREVIEW : NOT_REFERENCED_WILDFLY; + return new HashSet<>(List.of(concatArrays(NOT_REFERENCED_COMMON, NOT_REFERENCED_EXPANSION, extra))); + } + + protected Set getExpectedUnusedInAllLayers() { + String[] extra = AssumeTestGroupUtil.isWildFlyPreview() ? NO_LAYER_WILDFLY_PREVIEW : NO_LAYER_WILDFLY; + return new HashSet<>(List.of(concatArrays(NO_LAYER_COMMON, NO_LAYER_EXPANSION, extra))); + } + + private static String[] concatArrays(String[] common, String[] expansion, String[] pack) { + String[] result = Arrays.copyOf(common, common.length + expansion.length + pack.length); + System.arraycopy(expansion, 0, result, common.length, expansion.length); + System.arraycopy(pack, 0, result, common.length + expansion.length, pack.length); + return result; + } } diff --git a/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java b/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java index 77c2fba72970..328581d0223a 100644 --- a/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java +++ b/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java @@ -5,6 +5,11 @@ package org.jboss.as.test.layers.base; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + import org.jboss.as.test.layers.LayersTest; import org.jboss.as.test.shared.LayersTestBase; import org.jboss.as.test.shared.util.AssumeTestGroupUtil; @@ -32,4 +37,18 @@ public void testLayers() throws Exception { AssumeTestGroupUtil.assumeWildFlyPreview(); LayersTest.testExecution(root); } + + protected Set getExpectedUnreferenced() { + return new HashSet<>(List.of(concatArrays(NOT_REFERENCED_COMMON, NOT_REFERENCED_WILDFLY_EE))); + } + + protected Set getExpectedUnusedInAllLayers() { + return new HashSet<>(List.of(concatArrays(NO_LAYER_COMMON, NO_LAYER_WILDFLY_EE))); + } + + private static String[] concatArrays(String[] common, String[] pack) { + String[] result = Arrays.copyOf(common, common.length + pack.length); + System.arraycopy(pack, 0, result, common.length, pack.length); + return result; + } } diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index fa3e1d825a34..1f862558936d 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -8,22 +8,38 @@ import java.io.File; import java.util.Arrays; import java.util.HashMap; -import java.util.HashSet; import java.util.List; +import java.util.Set; -import org.apache.commons.lang3.ArrayUtils; import org.jboss.as.test.layers.LayersTest; -import org.jboss.as.test.shared.util.AssumeTestGroupUtil; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -public class LayersTestBase { - // Packages that are provisioned by the test-standalone-reference installation - // but not used in the test-all-layers installation. - // This is the expected set of not provisioned modules when all layers are provisioned. - private static final String[] NOT_USED_COMMON = { +public abstract class LayersTestBase { + + /** + * Gets the expected set of packages that are not referenced from the module graph + * but need to be provisioned. + * This is the expected set of modules found when scanning the default configuration that are + * not referenced directly or transitively from a standalone server's root module or from + * one of the extensions used in standalone.xml. + */ + protected abstract Set getExpectedUnreferenced(); + + /** + * Gets the expected set of packages that are provisioned by the test-standalone-reference installation + * but not used in the test-all-layers installation. + * This is the expected set of not provisioned modules when all layers are provisioned; i.e. + * those that are not associated with any layer included in the test-all-layers installation. + */ + protected abstract Set getExpectedUnusedInAllLayers(); + + /** + * Packages that are always expected to be included in the return value of {@link #getExpectedUnusedInAllLayers()}. + */ + public static final String[] NO_LAYER_COMMON = { // not used "ibm.jdk", "javax.api", @@ -119,11 +135,67 @@ public class LayersTestBase { //xerces dependency is eliminated from different subsystems and use JDK JAXP instead "org.apache.xerces", }; - private static final String[] NOT_USED; - // Packages that are not referenced from the module graph but needed. - // This is the expected set of un-referenced modules found when scanning - // the default configuration. - private static final String[] NOT_REFERENCED_COMMON = { + + /** + * Included in the return value of {@link #getExpectedUnusedInAllLayers()} + * only when testing provisioning directly from the wildfly-ee feature pack. + */ + public static final String[] NO_LAYER_WILDFLY_EE = { + // Messaging broker not included in the messaging-activemq layer + "org.jboss.xnio.netty.netty-xnio-transport", + // No patching modules in layers + "org.jboss.as.patching", + "org.jboss.as.patching.cli", + // Misc alternative variants of JPA things that we don't provide via layers + "org.jboss.as.jpa.hibernate:4", + "org.hibernate:5.0", + "org.hibernate.jipijapa-hibernate5", + "org.jboss.as.jpa.openjpa", + "org.apache.openjpa", + // TODO WFLY-16583 -- cruft + "javax.management.j2ee.api", + // In wildfly-ee only referenced by the + // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 + "io.reactivex.rxjava2.rxjava" + }; + + /** + * Included in the return value of {@link #getExpectedUnusedInAllLayers()} + * when testing provisioning from the wildfly or wildfly-preview feature packs. + * Use this array for items common between the two feature packs. + */ + public static final String[] NO_LAYER_EXPANSION = {}; + + /** + * Included in the return value of {@link #getExpectedUnusedInAllLayers()} + * only when testing provisioning from the wildfly feature pack. + */ + public static final String[] NO_LAYER_WILDFLY = { + // Legacy subsystems for which we will not provide layers + "org.wildfly.extension.microprofile.metrics-smallrye", + "org.wildfly.extension.microprofile.opentracing-smallrye", + }; + + /** + * Included in the return value of {@link #getExpectedUnusedInAllLayers()} + * only when testing provisioning from the wildfly-preview feature pack. + */ + public static final String[] NO_LAYER_WILDFLY_PREVIEW = { + // WFP standard config uses Micrometer instead of WF Metrics + "org.wildfly.extension.metrics", + // MP Fault Tolerance has a dependency on MP Metrics + "io.smallrye.fault-tolerance", + "org.eclipse.microprofile.fault-tolerance.api", + "org.wildfly.extension.microprofile.fault-tolerance-smallrye", + "org.wildfly.microprofile.fault-tolerance-smallrye.deployment", + // Used by Hibernate Search but only in preview TODO this doesn't seem right; NOT_REFERENCED should suffice + "org.hibernate.search.mapper.orm.coordination.outboxpolling" + }; + + /** + * Packages that are always expected to be included in the return value of {@link #getExpectedUnreferenced()}. + */ + public static final String[] NOT_REFERENCED_COMMON = { // injected by ee "org.eclipse.yasson", // injected by ee @@ -188,7 +260,62 @@ public class LayersTestBase { // TODO just a testsuite utility https://wildfly.zulipchat.com/#narrow/stream/174184-wildfly-developers/topic/org.2Ejboss.2Ews.2Ecxf.2Ests.20module "org.jboss.ws.cxf.sts", }; - private static final String[] NOT_REFERENCED; + + + /** + * Included in the return value of {@link #getExpectedUnreferenced()} + * only when testing provisioning directly from the wildfly-ee feature pack. + */ + public static final String[] NOT_REFERENCED_WILDFLY_EE = { + // WFLY-18386 two io.netty.netty-codec... modules should be moved to wildfly feature pack + "io.netty.netty-codec-dns", + "io.netty.netty-codec-http2", + // TODO + "io.netty.netty-resolver-dns", + "io.reactivex.rxjava2.rxjava", + // injected by logging + "org.apache.logging.log4j.api", + // injected by logging + "org.jboss.logmanager.log4j2", + // injected by ee + "jakarta.json.bind.api", + // injected by jpa + "org.hibernate.search.orm", + "org.hibernate.search.backend.elasticsearch", + "org.hibernate.search.backend.lucene", + // Used by the hibernate search that's injected by jpa + "org.elasticsearch.client.rest-client", + "com.google.code.gson", + "com.carrotsearch.hppc", + "org.apache.lucene", + // Brought by galleon ServerRootResourceDefinition + "wildflyee.api" + }; + + + /** + * Included in the return value of {@link #getExpectedUnreferenced()} + * when testing provisioning from the wildfly or wildfly-preview feature packs. + * Use this array for items common between the two feature packs. + */ + public static final String[] NOT_REFERENCED_EXPANSION = {}; + + /** + * Included in the return value of {@link #getExpectedUnreferenced()} + * only when testing provisioning from the wildfly-preview feature pack. + */ + public static final String[] NOT_REFERENCED_WILDFLY = {}; + + /** + * Included in the return value of {@link #getExpectedUnreferenced()} + * only when testing provisioning from the wildfly-preview feature pack. + */ + public static final String[] NOT_REFERENCED_WILDFLY_PREVIEW = { + "org.wildfly.extension.metrics", + // Used by the hibernate search that's injected by jpa + "org.hibernate.search.mapper.orm.coordination.outboxpolling", + "org.apache.avro" + }; /** * A HashMap to configure a banned module. @@ -198,99 +325,10 @@ public class LayersTestBase { * Notice the allowed installation names does not distinguish between different parent names, e.g test-all-layers here means * allowing root/test-all-layers and servletRoot/test-all-layers. */ - private static final HashMap> BANNED_MODULES_CONF = new HashMap>(){{ + private static final HashMap> BANNED_MODULES_CONF = new HashMap<>(){{ put("org.jboss.as.security", Arrays.asList("test-all-layers-jpa-distributed", "test-all-layers", "legacy-security", "test-standalone-reference")); }}; - static { - if (AssumeTestGroupUtil.isWildFlyPreview()) { - NOT_USED = ArrayUtils.addAll( - NOT_USED_COMMON, - // WFP standard config uses Micrometer instead of WF Metrics - "org.wildfly.extension.metrics", - // MP Fault Tolerance has a dependency on MP Metrics - "io.smallrye.fault-tolerance", - "org.eclipse.microprofile.fault-tolerance.api", - "org.wildfly.extension.microprofile.fault-tolerance-smallrye", - "org.wildfly.microprofile.fault-tolerance-smallrye.deployment", - // Used by Hibernate Search but only in preview TODO this doesn't seem right; NOT_REFERENCED should suffice - "org.hibernate.search.mapper.orm.coordination.outboxpolling" - ); - - NOT_REFERENCED = ArrayUtils.addAll( - NOT_REFERENCED_COMMON, - "org.wildfly.extension.metrics", - // Used by the hibernate search that's injected by jpa - "org.hibernate.search.mapper.orm.coordination.outboxpolling", - "org.apache.avro" - ); - } else { - NOT_USED = ArrayUtils.addAll( - NOT_USED_COMMON, - // Messaging broker not included in the messaging-activemq layer - "org.jboss.xnio.netty.netty-xnio-transport", - // No patching modules in layers - "org.jboss.as.patching", - "org.jboss.as.patching.cli", - // Misc alternative variants of JPA things that we don't provide via layers - "org.jboss.as.jpa.hibernate:4", - "org.hibernate:5.0", - "org.hibernate.jipijapa-hibernate5", - "org.jboss.as.jpa.openjpa", - "org.apache.openjpa", - // TODO WFLY-16583 -- cruft - "javax.management.j2ee.api" - ); - NOT_REFERENCED = ArrayUtils.addAll( - NOT_REFERENCED_COMMON, - // Standard configs don't include various MP subsystems - "org.wildfly.extension.microprofile.fault-tolerance-smallrye", - "io.jaegertracing", - "io.netty.netty-codec-dns", - "io.netty.netty-codec-http2", - "io.netty.netty-resolver-dns", - "io.reactivex.rxjava2.rxjava", - "io.smallrye.common.vertx-context", - "io.smallrye.reactive.messaging", - "io.smallrye.reactive.messaging.connector", - "io.smallrye.reactive.messaging.connector.kafka", - "io.smallrye.reactive.messaging.connector.kafka.api", - "io.smallrye.reactive.mutiny", - "io.smallrye.reactive.mutiny.reactive-streams-operators", - "io.smallrye.reactive.mutiny.vertx-core", - "io.smallrye.reactive.mutiny.vertx-kafka-client", - "io.smallrye.reactive.mutiny.vertx-runtime", - "io.vertx.client.kafka", - "io.vertx.core", - "org.apache.kafka.client", - "org.eclipse.microprofile.reactive-messaging.api", - "org.eclipse.microprofile.reactive-streams-operators.api", - "org.eclipse.microprofile.reactive-streams-operators.core", - "org.wildfly.reactive.messaging.common", - "org.wildfly.reactive.messaging.config", - "org.wildfly.reactive.messaging.kafka", - // injected by logging - "org.apache.logging.log4j.api", - // injected by logging - "org.jboss.logmanager.log4j2", -// "org.jboss.as.product:wildfly-web", - // injected by ee - "javax.json.bind.api", - // injected by jpa - "org.hibernate.search.orm", - "org.hibernate.search.backend.elasticsearch", - "org.hibernate.search.backend.lucene", - // Used by the hibernate search that's injected by jpa - "org.elasticsearch.client.rest-client", - "com.google.code.gson", - "com.carrotsearch.hppc", - "org.apache.lucene", - // Brought by galleon ServerRootResourceDefinition - "wildflyee.api" - ); - } - } - public static String root; public static String defaultConfigsRoot; @@ -317,8 +355,7 @@ public static void cleanUp() { @Test public void test() throws Exception { - LayersTest.test(root, new HashSet<>(Arrays.asList(NOT_REFERENCED)), - new HashSet<>(Arrays.asList(NOT_USED))); + LayersTest.test(root, getExpectedUnreferenced(), getExpectedUnusedInAllLayers()); } @Test From 5faebfeaddddcd8ea7973406e979d7fa69f23434 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 21:13:42 -0400 Subject: [PATCH 03/36] [WFLY-18332] org.jboss.resteasy.resteasy-json-p-provider is not referenced by any OOTB subsystem --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 1f862558936d..2b3b923cc48d 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -202,6 +202,8 @@ public abstract class LayersTestBase { "org.wildfly.naming", // Injected by jaxrs "org.jboss.resteasy.resteasy-json-binding-provider", + // Injected by jaxrs and also depended upon by narayano-rts, which is part of the non-OOTB rts subsystem + "org.jboss.resteasy.resteasy-json-p-provider", // The console ui content is not part of the kernel nor is it provided by an extension "org.jboss.as.console", // tooling From 2ea9c1c3d0f34f5a7b6751362063d545008bb79f Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 21:15:16 -0400 Subject: [PATCH 04/36] [WFLY-18332] log4j modules injected by logging subsystem are unreferenced in test of all FPs --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 2b3b923cc48d..397a403868c5 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -196,6 +196,9 @@ public abstract class LayersTestBase { * Packages that are always expected to be included in the return value of {@link #getExpectedUnreferenced()}. */ public static final String[] NOT_REFERENCED_COMMON = { + // injected by logging + "org.apache.logging.log4j.api", + "org.jboss.logmanager.log4j2", // injected by ee "org.eclipse.yasson", // injected by ee @@ -275,10 +278,6 @@ public abstract class LayersTestBase { // TODO "io.netty.netty-resolver-dns", "io.reactivex.rxjava2.rxjava", - // injected by logging - "org.apache.logging.log4j.api", - // injected by logging - "org.jboss.logmanager.log4j2", // injected by ee "jakarta.json.bind.api", // injected by jpa From 04206292c74a4241cf95efd51202ea49ca0d4ff5 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 21:44:16 -0400 Subject: [PATCH 05/36] [WFLY-18332] Include elytron-oidc-client layer in test-all-layers --- testsuite/layers-expansion/pom.xml | 3 +++ testsuite/layers/pom.xml | 3 +++ .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 5 ----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/testsuite/layers-expansion/pom.xml b/testsuite/layers-expansion/pom.xml index 8bd0bf3a7715..bc7298a98c78 100644 --- a/testsuite/layers-expansion/pom.xml +++ b/testsuite/layers-expansion/pom.xml @@ -649,6 +649,7 @@ ejb-lite ejb-local-cache elytron + elytron-oidc-client embedded-activemq hibernate-search h2-datasource @@ -756,6 +757,7 @@ ejb-http-invoker ejb-lite elytron + elytron-oidc-client hibernate-search h2-datasource h2-default-datasource @@ -857,6 +859,7 @@ ejb-lite ejb-local-cache elytron + elytron-oidc-client embedded-activemq hibernate-search h2-datasource diff --git a/testsuite/layers/pom.xml b/testsuite/layers/pom.xml index c03dc80c03b3..078ec5f8e01b 100644 --- a/testsuite/layers/pom.xml +++ b/testsuite/layers/pom.xml @@ -2139,6 +2139,7 @@ ejb-lite ejb-local-cache elytron + elytron-oidc-client embedded-activemq hibernate-search h2-datasource @@ -2229,6 +2230,7 @@ ejb-http-invoker ejb-lite elytron + elytron-oidc-client hibernate-search h2-datasource h2-default-datasource @@ -2349,6 +2351,7 @@ ejb-lite ejb-local-cache elytron + elytron-oidc-client embedded-activemq hibernate-search h2-datasource diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 397a403868c5..1bb0b4fa6c3e 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -94,11 +94,6 @@ public abstract class LayersTestBase { "org.jboss.narayana.rts", // TODO we need to add an xts layer "org.jboss.as.xts", - // TODO we need to add the elytron-oidc-client layer to the config - "org.wildfly.extension.elytron-oidc-client", - "org.wildfly.security.elytron-http-oidc", - "org.wildfly.security.elytron-jose-jwk", - "org.wildfly.security.elytron-jose-util", // TODO WFLY-16586 microprofile-reactive-streams-operators layer should provision this "org.wildfly.reactive.dep.jts", // TODO should an undertow layer specify this? From daddfe84938e5accddd613f16dda2d0d1c327b96 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 21:59:49 -0400 Subject: [PATCH 06/36] [WFLY-18332] io.reactivex.rxjava2.rxjava is not provided by any wildfly-ee layer --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 1bb0b4fa6c3e..a1c741f868e9 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -272,7 +272,6 @@ public abstract class LayersTestBase { "io.netty.netty-codec-http2", // TODO "io.netty.netty-resolver-dns", - "io.reactivex.rxjava2.rxjava", // injected by ee "jakarta.json.bind.api", // injected by jpa From 4b5a33291a37e5d673885cff2065ed5c924d686b Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 22:04:55 -0400 Subject: [PATCH 07/36] [WFLY-18332] Since WFLY-16583 javax.management.j2ee.api is not provisioned --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index a1c741f868e9..2979257af666 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -147,8 +147,6 @@ public abstract class LayersTestBase { "org.hibernate.jipijapa-hibernate5", "org.jboss.as.jpa.openjpa", "org.apache.openjpa", - // TODO WFLY-16583 -- cruft - "javax.management.j2ee.api", // In wildfly-ee only referenced by the // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 "io.reactivex.rxjava2.rxjava" From c8c9304ccc2f1090839f9fd002216b212f83c0e4 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 22:07:33 -0400 Subject: [PATCH 08/36] [WFLY-18332] Misc alternative JPA modules are no longer provisioned --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 2979257af666..67fb3289fd6a 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -141,12 +141,6 @@ public abstract class LayersTestBase { // No patching modules in layers "org.jboss.as.patching", "org.jboss.as.patching.cli", - // Misc alternative variants of JPA things that we don't provide via layers - "org.jboss.as.jpa.hibernate:4", - "org.hibernate:5.0", - "org.hibernate.jipijapa-hibernate5", - "org.jboss.as.jpa.openjpa", - "org.apache.openjpa", // In wildfly-ee only referenced by the // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 "io.reactivex.rxjava2.rxjava" From a6ca3ce707e2c60ed7354c9b211713b80402550e Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 22:09:13 -0400 Subject: [PATCH 09/36] [WFLY-18332] io.opentelemetry.trace does not exist --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 67fb3289fd6a..6827682f7895 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -105,7 +105,6 @@ public abstract class LayersTestBase { "io.opentelemetry.sdk", "io.opentelemetry.proto", "io.opentelemetry.otlp", - "io.opentelemetry.trace", // Micrometer is not included in standard configs "io.micrometer", "org.wildfly.extension.micrometer", From 6385ae28da9fad1c0ef3b027e65c1c880a4abc98 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 22:11:49 -0400 Subject: [PATCH 10/36] [WFLY-18332] org.eclipse.yasson is referenced by jakarta.json.bind.api --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 6827682f7895..20f9b0c64523 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -186,8 +186,6 @@ public abstract class LayersTestBase { "org.apache.logging.log4j.api", "org.jboss.logmanager.log4j2", // injected by ee - "org.eclipse.yasson", - // injected by ee "org.wildfly.naming", // Injected by jaxrs "org.jboss.resteasy.resteasy-json-binding-provider", From e89b74a428dadb2327a7b118bd2d46f5a717699d Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 22:17:31 -0400 Subject: [PATCH 11/36] [WFLY-18332] org.jboss.resteasy.microprofile.config is not provisioned by wildfly-ee and is part of layers provided by wildfly and wildfly-preview --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 20f9b0c64523..9dc65c35b7a2 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -58,7 +58,7 @@ public abstract class LayersTestBase { "org.keycloak.keycloak-adapter-subsystem", "org.jboss.as.security", // end legacy subsystems ^^^ - // TODO nothing references this + // Special support feature "org.wildfly.security.http.sfbasic", // TODO move eclipse link support to an external feature pack "org.eclipse.persistence", @@ -78,9 +78,6 @@ public abstract class LayersTestBase { // Perhaps via deployment descriptor? In any case, no layer provides them "org.wildfly.security.jakarta.client.resteasy", "org.wildfly.security.jakarta.client.webservices", - // This is added in the jaxrs subsystem to deployments if the MP config capability is met. The package is - // added in the microprofile-rest-client as well. - "org.jboss.resteasy.microprofile.config", // Alternative messaging protocols besides the std Artemis core protocol // Use of these depends on an attribute value setting "org.apache.activemq.artemis.protocol.amqp", From 7596723d67382c4c3fc07a619428d368f1cfc18d Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sat, 26 Aug 2023 22:22:39 -0400 Subject: [PATCH 12/36] [WFLY-18332] Legacy MP subsystems are not provisioned by wildfly-ee and are not in the layer set for wildfly or wildfly-preview --- .../jboss/as/test/shared/LayersTestBase.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 9dc65c35b7a2..1ef63df8317f 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -120,9 +120,6 @@ public abstract class LayersTestBase { // JGroups external protocols - AWS "org.jgroups.aws", "software.amazon.awssdk.s3", - // MicroProfile - "org.wildfly.extension.microprofile.metrics-smallrye", - "org.wildfly.extension.microprofile.opentracing-smallrye", //xerces dependency is eliminated from different subsystems and use JDK JAXP instead "org.apache.xerces", }; @@ -147,17 +144,17 @@ public abstract class LayersTestBase { * when testing provisioning from the wildfly or wildfly-preview feature packs. * Use this array for items common between the two feature packs. */ - public static final String[] NO_LAYER_EXPANSION = {}; + public static final String[] NO_LAYER_EXPANSION = { + // Legacy subsystems for which we will not provide layers + "org.wildfly.extension.microprofile.metrics-smallrye", + "org.wildfly.extension.microprofile.opentracing-smallrye", + }; /** * Included in the return value of {@link #getExpectedUnusedInAllLayers()} * only when testing provisioning from the wildfly feature pack. */ - public static final String[] NO_LAYER_WILDFLY = { - // Legacy subsystems for which we will not provide layers - "org.wildfly.extension.microprofile.metrics-smallrye", - "org.wildfly.extension.microprofile.opentracing-smallrye", - }; + public static final String[] NO_LAYER_WILDFLY = {}; /** * Included in the return value of {@link #getExpectedUnusedInAllLayers()} @@ -172,7 +169,7 @@ public abstract class LayersTestBase { "org.wildfly.extension.microprofile.fault-tolerance-smallrye", "org.wildfly.microprofile.fault-tolerance-smallrye.deployment", // Used by Hibernate Search but only in preview TODO this doesn't seem right; NOT_REFERENCED should suffice - "org.hibernate.search.mapper.orm.coordination.outboxpolling" + "org.hibernate.search.mapper.orm.coordination.outboxpolling", }; /** From 352c41eb0a35026cf132855f10bbf4ba975efa38 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sun, 27 Aug 2023 16:23:04 -0400 Subject: [PATCH 13/36] [WFLY-18332] Unreferenced MP extension modules are not relevant to wildfly-ee testing --- .../jboss/as/test/shared/LayersTestBase.java | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 1ef63df8317f..fc1ed9d0539c 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -211,29 +211,6 @@ public abstract class LayersTestBase { "org.wildfly.bootable-jar", // Extension not included in the default config "org.wildfly.extension.clustering.singleton", - // Extension not included in the default config - "org.wildfly.extension.microprofile.health-smallrye", - "org.eclipse.microprofile.health.api", - "io.smallrye.health", - // Extension not included in the default config - "org.wildfly.extension.microprofile.lra-coordinator", - "org.wildfly.extension.microprofile.lra-participant", - "org.jboss.narayana.rts.lra-coordinator", - "org.jboss.narayana.rts.lra-participant", - "org.eclipse.microprofile.lra.api", - // Extension not included in the default config - "org.wildfly.extension.microprofile.openapi-smallrye", - "org.eclipse.microprofile.openapi.api", - "io.smallrye.openapi", - "com.fasterxml.jackson.dataformat.jackson-dataformat-yaml", - // Extension not included in the default config - "org.wildfly.extension.microprofile.reactive-messaging-smallrye", - // Extension not included in the default config - "org.wildfly.extension.microprofile.telemetry", - // Extension not included in the default config - "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye", - "org.wildfly.reactive.mutiny.reactive-streams-operators.cdi-provider", - "io.vertx.client", // Dynamically added by ee-security and mp-jwt-smallrye DUPs but not referenced by subsystems. "org.wildfly.security.jakarta.security", // injected by sar @@ -276,7 +253,31 @@ public abstract class LayersTestBase { * when testing provisioning from the wildfly or wildfly-preview feature packs. * Use this array for items common between the two feature packs. */ - public static final String[] NOT_REFERENCED_EXPANSION = {}; + public static final String[] NOT_REFERENCED_EXPANSION = { + // Extension not included in the default config + "org.wildfly.extension.microprofile.health-smallrye", + "org.eclipse.microprofile.health.api", + "io.smallrye.health", + // Extension not included in the default config + "org.wildfly.extension.microprofile.lra-coordinator", + "org.wildfly.extension.microprofile.lra-participant", + "org.jboss.narayana.rts.lra-coordinator", + "org.jboss.narayana.rts.lra-participant", + "org.eclipse.microprofile.lra.api", + // Extension not included in the default config + "org.wildfly.extension.microprofile.openapi-smallrye", + "org.eclipse.microprofile.openapi.api", + "io.smallrye.openapi", + "com.fasterxml.jackson.dataformat.jackson-dataformat-yaml", + // Extension not included in the default config + "org.wildfly.extension.microprofile.reactive-messaging-smallrye", + // Extension not included in the default config + "org.wildfly.extension.microprofile.telemetry", + // Extension not included in the default config + "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye", + "org.wildfly.reactive.mutiny.reactive-streams-operators.cdi-provider", + "io.vertx.client", + }; /** * Included in the return value of {@link #getExpectedUnreferenced()} From 26117c4e7f576e6155c69ecc842634fee3dcd229 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sun, 27 Aug 2023 16:27:25 -0400 Subject: [PATCH 14/36] [WFLY-18332] The org.jboss.resteasy.microprofile.config module is injected by jaxrs and isn't referenced --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index fc1ed9d0539c..94f5f97427cc 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -277,6 +277,8 @@ public abstract class LayersTestBase { "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye", "org.wildfly.reactive.mutiny.reactive-streams-operators.cdi-provider", "io.vertx.client", + // Injected by jaxrs subsystem + "org.jboss.resteasy.microprofile.config" }; /** From 39642c9fd8789fa4fe6d7729f4927bfcc988deba Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sun, 27 Aug 2023 16:47:09 -0400 Subject: [PATCH 15/36] [WFLY-18332] Hibernate Search outboxpolling and Avro are used in a layer and referenced in wildfly-preview --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 94f5f97427cc..bc2c492bb060 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -168,8 +168,6 @@ public abstract class LayersTestBase { "org.eclipse.microprofile.fault-tolerance.api", "org.wildfly.extension.microprofile.fault-tolerance-smallrye", "org.wildfly.microprofile.fault-tolerance-smallrye.deployment", - // Used by Hibernate Search but only in preview TODO this doesn't seem right; NOT_REFERENCED should suffice - "org.hibernate.search.mapper.orm.coordination.outboxpolling", }; /** @@ -293,9 +291,6 @@ public abstract class LayersTestBase { */ public static final String[] NOT_REFERENCED_WILDFLY_PREVIEW = { "org.wildfly.extension.metrics", - // Used by the hibernate search that's injected by jpa - "org.hibernate.search.mapper.orm.coordination.outboxpolling", - "org.apache.avro" }; /** From 019133399ab0aa9ea36f08c48e1b5f50e839affa Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sun, 27 Aug 2023 21:09:20 -0400 Subject: [PATCH 16/36] [WFLY-18332] MP FT is used by a layer, but isn't referenced as its extension is not in the OOTB config --- .../java/org/jboss/as/test/shared/LayersTestBase.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index bc2c492bb060..78070ef4049e 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -163,11 +163,6 @@ public abstract class LayersTestBase { public static final String[] NO_LAYER_WILDFLY_PREVIEW = { // WFP standard config uses Micrometer instead of WF Metrics "org.wildfly.extension.metrics", - // MP Fault Tolerance has a dependency on MP Metrics - "io.smallrye.fault-tolerance", - "org.eclipse.microprofile.fault-tolerance.api", - "org.wildfly.extension.microprofile.fault-tolerance-smallrye", - "org.wildfly.microprofile.fault-tolerance-smallrye.deployment", }; /** @@ -252,6 +247,11 @@ public abstract class LayersTestBase { * Use this array for items common between the two feature packs. */ public static final String[] NOT_REFERENCED_EXPANSION = { + // Extension not included in the default config + "org.wildfly.extension.microprofile.fault-tolerance-smallrye", + "org.wildfly.microprofile.fault-tolerance-smallrye.deployment", + "io.smallrye.fault-tolerance", + "org.eclipse.microprofile.fault-tolerance.api", // Extension not included in the default config "org.wildfly.extension.microprofile.health-smallrye", "org.eclipse.microprofile.health.api", From 32dbe308bb0f866a208897f2cb79bbeb65c7f6a3 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Sun, 27 Aug 2023 21:50:20 -0400 Subject: [PATCH 17/36] [WFLY-18332] Micrometer and Opentelemetry are provided by layers, but micrometer is not in the OOTB config --- testsuite/layers-expansion/pom.xml | 2 ++ .../jboss/as/test/shared/LayersTestBase.java | 20 ++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/testsuite/layers-expansion/pom.xml b/testsuite/layers-expansion/pom.xml index bc7298a98c78..e79d3738ccbd 100644 --- a/testsuite/layers-expansion/pom.xml +++ b/testsuite/layers-expansion/pom.xml @@ -673,6 +673,7 @@ mail management messaging-activemq + micrometer mod_cluster naming observability @@ -778,6 +779,7 @@ mail management messaging-activemq + micrometer mod_cluster naming observability diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 78070ef4049e..0d05084e7d13 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -95,20 +95,6 @@ public abstract class LayersTestBase { "org.wildfly.reactive.dep.jts", // TODO should an undertow layer specify this? "org.wildfly.event.logger", - // TODO test-all-layers uses microprofile-opentracing instead of opentelemetry - "org.wildfly.extension.opentelemetry", - "org.wildfly.extension.opentelemetry-api", - "io.opentelemetry.exporter", - "io.opentelemetry.sdk", - "io.opentelemetry.proto", - "io.opentelemetry.otlp", - // Micrometer is not included in standard configs - "io.micrometer", - "org.wildfly.extension.micrometer", - "org.wildfly.micrometer.deployment", - "com.squareup.okhttp3", - "org.jetbrains.kotlin.kotlin-stdlib", - "com.google.protobuf", // Unreferenced Infinispan modules "org.infinispan.cdi.common", "org.infinispan.cdi.embedded", @@ -275,6 +261,12 @@ public abstract class LayersTestBase { "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye", "org.wildfly.reactive.mutiny.reactive-streams-operators.cdi-provider", "io.vertx.client", + // Extension not included in the default config + "org.wildfly.extension.micrometer", + "org.wildfly.micrometer.deployment", + "io.micrometer", + "com.google.protobuf", + "io.opentelemetry.proto", // Injected by jaxrs subsystem "org.jboss.resteasy.microprofile.config" }; From 84c720324c711e178f3c1c778e6a64fd5c2f1d7c Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 28 Aug 2023 07:00:51 -0400 Subject: [PATCH 18/36] [WFLY-18332] The WFLY-16586 does not affect wildfly-ee testing --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 0d05084e7d13..21497c578c20 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -91,8 +91,6 @@ public abstract class LayersTestBase { "org.jboss.narayana.rts", // TODO we need to add an xts layer "org.jboss.as.xts", - // TODO WFLY-16586 microprofile-reactive-streams-operators layer should provision this - "org.wildfly.reactive.dep.jts", // TODO should an undertow layer specify this? "org.wildfly.event.logger", // Unreferenced Infinispan modules @@ -134,6 +132,8 @@ public abstract class LayersTestBase { // Legacy subsystems for which we will not provide layers "org.wildfly.extension.microprofile.metrics-smallrye", "org.wildfly.extension.microprofile.opentracing-smallrye", + // TODO WFLY-16586 microprofile-reactive-streams-operators layer should provision this + "org.wildfly.reactive.dep.jts", }; /** From 577f48b52821aa124c1216e3d929cc3330d2db93 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 28 Aug 2023 07:06:20 -0400 Subject: [PATCH 19/36] [WFLY-18332] org.jboss.resteasy.resteasy-client-microprofile is not relevant to wildfly-ee testing --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 21497c578c20..6a802f080775 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -178,7 +178,6 @@ public abstract class LayersTestBase { "org.jboss.as.standalone", // injected by logging "org.jboss.logging.jul-to-slf4j-stub", - "org.jboss.resteasy.resteasy-client-microprofile", // Webservices tooling "org.jboss.ws.tools.common", "org.jboss.ws.tools.wsconsume", @@ -268,7 +267,8 @@ public abstract class LayersTestBase { "com.google.protobuf", "io.opentelemetry.proto", // Injected by jaxrs subsystem - "org.jboss.resteasy.microprofile.config" + "org.jboss.resteasy.microprofile.config", + "org.jboss.resteasy.resteasy-client-microprofile", }; /** From eb3235515422a5aa693ba12f12bd349ffee2a756 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 28 Aug 2023 07:28:24 -0400 Subject: [PATCH 20/36] [WFLY-18332] Use a consistent set of layers in the various 'all-layers' installations --- testsuite/layers-expansion/pom.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/testsuite/layers-expansion/pom.xml b/testsuite/layers-expansion/pom.xml index e79d3738ccbd..7afc1461a18e 100644 --- a/testsuite/layers-expansion/pom.xml +++ b/testsuite/layers-expansion/pom.xml @@ -694,7 +694,7 @@ web-server webservices microprofile-config microprofile-fault-tolerance @@ -801,13 +801,18 @@ web-server webservices microprofile-config microprofile-fault-tolerance microprofile-health + microprofile-lra-coordinator + microprofile-lra-participant microprofile-jwt microprofile-openapi + microprofile-reactive-streams-operators + microprofile-reactive-messaging + microprofile-reactive-messaging-kafka microprofile-telemetry microprofile-platform @@ -903,9 +908,10 @@ web-server webservices microprofile-config + microprofile-fault-tolerance microprofile-health microprofile-jwt microprofile-lra-coordinator @@ -916,6 +922,7 @@ microprofile-reactive-messaging-kafka microprofile-rest-client microprofile-telemetry + microprofile-platform From 850d34790fcc7ff78664011d646f08397cbde746 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 15:45:00 -0500 Subject: [PATCH 21/36] [WFLY-18332] Netty issues with wildfly-ee are not real --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 6a802f080775..232786451194 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -205,11 +205,6 @@ public abstract class LayersTestBase { * only when testing provisioning directly from the wildfly-ee feature pack. */ public static final String[] NOT_REFERENCED_WILDFLY_EE = { - // WFLY-18386 two io.netty.netty-codec... modules should be moved to wildfly feature pack - "io.netty.netty-codec-dns", - "io.netty.netty-codec-http2", - // TODO - "io.netty.netty-resolver-dns", // injected by ee "jakarta.json.bind.api", // injected by jpa From 063e3eecd0477eed1dc5972f5982eaaf5ce5c02b Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 16:03:36 -0500 Subject: [PATCH 22/36] [WFLY-18332] org.hibernate.search.orm is an alias; track the target org.hibernate.search.mapper.orm instead --- .../src/main/java/org/jboss/as/jpa/subsystem/JPADefinition.java | 2 +- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jpa/subsystem/src/main/java/org/jboss/as/jpa/subsystem/JPADefinition.java b/jpa/subsystem/src/main/java/org/jboss/as/jpa/subsystem/JPADefinition.java index 2209ec356544..d88f53fabc29 100644 --- a/jpa/subsystem/src/main/java/org/jboss/as/jpa/subsystem/JPADefinition.java +++ b/jpa/subsystem/src/main/java/org/jboss/as/jpa/subsystem/JPADefinition.java @@ -77,7 +77,7 @@ public void registerAttributes(ManagementResourceRegistration registration) { public void registerAdditionalRuntimePackages(final ManagementResourceRegistration resourceRegistration) { resourceRegistration.registerAdditionalRuntimePackages( // Only if annotation is in use. - RuntimePackageDependency.optional("org.hibernate.search.orm"), + RuntimePackageDependency.optional("org.hibernate.search.mapper.orm"), RuntimePackageDependency.required("org.hibernate"), // An alias to org.hibernate module. RuntimePackageDependency.optional("org.hibernate.envers")); diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 232786451194..d3b843f1e5c2 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -208,7 +208,7 @@ public abstract class LayersTestBase { // injected by ee "jakarta.json.bind.api", // injected by jpa - "org.hibernate.search.orm", + "org.hibernate.search.mapper.orm", "org.hibernate.search.backend.elasticsearch", "org.hibernate.search.backend.lucene", // Used by the hibernate search that's injected by jpa From f78cb2ca9b6982c30671665a31504a58248c4184 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 4 Sep 2023 20:55:16 -0500 Subject: [PATCH 23/36] [WFLY-18332] Patching modules *are* in layers --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index d3b843f1e5c2..53a50c7b8cbf 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -115,9 +115,6 @@ public abstract class LayersTestBase { public static final String[] NO_LAYER_WILDFLY_EE = { // Messaging broker not included in the messaging-activemq layer "org.jboss.xnio.netty.netty-xnio-transport", - // No patching modules in layers - "org.jboss.as.patching", - "org.jboss.as.patching.cli", // In wildfly-ee only referenced by the // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 "io.reactivex.rxjava2.rxjava" From 78e8ceef586d47335e21df56c23deb8625d45c88 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 16:21:26 -0500 Subject: [PATCH 24/36] [WFLY-18332] org.jboss.resteasy.resteasy-tracing-api is available via layers --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 53a50c7b8cbf..432eaed0d97d 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -72,7 +72,6 @@ public abstract class LayersTestBase { // This was brought in as part an RFE, WFLY-10632 & WFLY-10636. While the module is currently marked as private, // for now we should keep this module. "org.jboss.resteasy.resteasy-rxjava2", - "org.jboss.resteasy.resteasy-tracing-api", // TODO these implement SPIs from RESTEasy or JBoss WS but I don't know how they integrate // as there is no ref to them in any module.xml nor any in WF java code. // Perhaps via deployment descriptor? In any case, no layer provides them From 019c0397743d15e2ad10f30fcbdb21da735348d6 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 16:28:25 -0500 Subject: [PATCH 25/36] [WFLY-18332] The test-all-layers installation includes the embedded-activemq layer so it's modules are expected --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 432eaed0d97d..fcd2daf2dcf6 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -112,8 +112,6 @@ public abstract class LayersTestBase { * only when testing provisioning directly from the wildfly-ee feature pack. */ public static final String[] NO_LAYER_WILDFLY_EE = { - // Messaging broker not included in the messaging-activemq layer - "org.jboss.xnio.netty.netty-xnio-transport", // In wildfly-ee only referenced by the // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 "io.reactivex.rxjava2.rxjava" From cda317ad256bc856877061084863f3d36a3163b2 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 17:00:11 -0500 Subject: [PATCH 26/36] [WFLY-18332] Modules added under WFLY-13520 are part of a layer but are not referenced Ensure the 'infinispan' layer is included consistently in the various 'all-layers' installations. --- testsuite/layers-expansion/pom.xml | 4 ++++ testsuite/layers/pom.xml | 3 +++ .../org/jboss/as/test/shared/LayersTestBase.java | 16 ++++++++-------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/testsuite/layers-expansion/pom.xml b/testsuite/layers-expansion/pom.xml index 7afc1461a18e..94d6eae5f753 100644 --- a/testsuite/layers-expansion/pom.xml +++ b/testsuite/layers-expansion/pom.xml @@ -764,6 +764,7 @@ h2-default-datasource h2-driver iiop-openjdk + infinispan io jaxrs jaxrs-server @@ -874,7 +875,9 @@ h2-driver health iiop-openjdk + infinispan io + infinispan jaxrs jaxrs-server jdr @@ -976,6 +979,7 @@ h2-driver health iiop-openjdk + infinispan io jaxrs jaxrs-server diff --git a/testsuite/layers/pom.xml b/testsuite/layers/pom.xml index 078ec5f8e01b..862c21ebee21 100644 --- a/testsuite/layers/pom.xml +++ b/testsuite/layers/pom.xml @@ -2236,6 +2236,7 @@ h2-default-datasource h2-driver iiop-openjdk + infinispan io jaxrs jaxrs-server @@ -2359,6 +2360,7 @@ h2-driver health iiop-openjdk + infinispan io jaxrs jaxrs-server @@ -2445,6 +2447,7 @@ h2-driver health iiop-openjdk + infinispan io jaxrs jaxrs-server diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index fcd2daf2dcf6..c4bc60ad8657 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -92,14 +92,6 @@ public abstract class LayersTestBase { "org.jboss.as.xts", // TODO should an undertow layer specify this? "org.wildfly.event.logger", - // Unreferenced Infinispan modules - "org.infinispan.cdi.common", - "org.infinispan.cdi.embedded", - "org.infinispan.cdi.remote", - "org.infinispan.counter", - "org.infinispan.lock", - "org.infinispan.query", - "org.infinispan.query.core", // JGroups external protocols - AWS "org.jgroups.aws", "software.amazon.awssdk.s3", @@ -191,6 +183,14 @@ public abstract class LayersTestBase { "org.jboss.ws.saaj-impl", // TODO just a testsuite utility https://wildfly.zulipchat.com/#narrow/stream/174184-wildfly-developers/topic/org.2Ejboss.2Ews.2Ecxf.2Ests.20module "org.jboss.ws.cxf.sts", + // WFLY-13520 Unreferenced Infinispan modules available for applications to depend upon + "org.infinispan.cdi.common", + "org.infinispan.cdi.embedded", + "org.infinispan.cdi.remote", + "org.infinispan.counter", + "org.infinispan.lock", + "org.infinispan.query", + "org.infinispan.query.core", }; From 78074ddbb606d121e73b60ba41c50491f36ec007 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 17:13:03 -0500 Subject: [PATCH 27/36] [WFLY-18332] jgroups-aws modules are provided by a layer but are not referenced Ensure the jgroups-aws layer is handled concistently in the various 'all-layers' installations --- testsuite/layers-expansion/pom.xml | 3 +++ testsuite/layers/pom.xml | 3 +++ .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/testsuite/layers-expansion/pom.xml b/testsuite/layers-expansion/pom.xml index 94d6eae5f753..f82b8dae7f12 100644 --- a/testsuite/layers-expansion/pom.xml +++ b/testsuite/layers-expansion/pom.xml @@ -769,6 +769,7 @@ jaxrs jaxrs-server jdr + jgroups-aws jms-activemq jmx jmx-remoting @@ -881,6 +882,7 @@ jaxrs jaxrs-server jdr + jgroups-aws jms-activemq jmx jmx-remoting @@ -984,6 +986,7 @@ jaxrs jaxrs-server jdr + jgroups-aws jms-activemq jmx jmx-remoting diff --git a/testsuite/layers/pom.xml b/testsuite/layers/pom.xml index 862c21ebee21..24445a692aa6 100644 --- a/testsuite/layers/pom.xml +++ b/testsuite/layers/pom.xml @@ -2241,6 +2241,7 @@ jaxrs jaxrs-server jdr + jgroups-aws jms-activemq jmx jmx-remoting @@ -2365,6 +2366,7 @@ jaxrs jaxrs-server jdr + jgroups-aws jms-activemq jmx jmx-remoting @@ -2452,6 +2454,7 @@ jaxrs jaxrs-server jdr + jgroups-aws jms-activemq jmx jmx-remoting diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index c4bc60ad8657..20df2ce794d7 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -92,9 +92,6 @@ public abstract class LayersTestBase { "org.jboss.as.xts", // TODO should an undertow layer specify this? "org.wildfly.event.logger", - // JGroups external protocols - AWS - "org.jgroups.aws", - "software.amazon.awssdk.s3", //xerces dependency is eliminated from different subsystems and use JDK JAXP instead "org.apache.xerces", }; @@ -191,6 +188,9 @@ public abstract class LayersTestBase { "org.infinispan.lock", "org.infinispan.query", "org.infinispan.query.core", + // WFLY-8770 jgroups-aws layer modules needed to configure the aws.S3_PING protocol are not referenced + "org.jgroups.aws", + "software.amazon.awssdk.s3", }; From 82fcd2e9ed4cc99ca6dd20173a076121bd78bb1e Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 29 Aug 2023 18:31:21 -0500 Subject: [PATCH 28/36] [WFLY-18332] The micrometer subsystem *is* in the default config in WildFly Preview --- .../org/jboss/as/test/shared/LayersTestBase.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 20df2ce794d7..3af6b2fd5d58 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -249,12 +249,6 @@ public abstract class LayersTestBase { "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye", "org.wildfly.reactive.mutiny.reactive-streams-operators.cdi-provider", "io.vertx.client", - // Extension not included in the default config - "org.wildfly.extension.micrometer", - "org.wildfly.micrometer.deployment", - "io.micrometer", - "com.google.protobuf", - "io.opentelemetry.proto", // Injected by jaxrs subsystem "org.jboss.resteasy.microprofile.config", "org.jboss.resteasy.resteasy-client-microprofile", @@ -264,7 +258,14 @@ public abstract class LayersTestBase { * Included in the return value of {@link #getExpectedUnreferenced()} * only when testing provisioning from the wildfly-preview feature pack. */ - public static final String[] NOT_REFERENCED_WILDFLY = {}; + public static final String[] NOT_REFERENCED_WILDFLY = { + // Extension not included in the default config + "org.wildfly.extension.micrometer", + "org.wildfly.micrometer.deployment", + "io.micrometer", + "com.google.protobuf", + "io.opentelemetry.proto", + }; /** * Included in the return value of {@link #getExpectedUnreferenced()} From d2819a608ad76e8b03f3fdcbd15df707565d8868 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 4 Sep 2023 11:41:18 -0500 Subject: [PATCH 29/36] [WFLY-18332] org.infinispan.query references org.hibernate.search.engine, making its tree referenced --- .../java/org/jboss/as/test/shared/LayersTestBase.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 3af6b2fd5d58..8ed3ec883556 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -201,15 +201,6 @@ public abstract class LayersTestBase { public static final String[] NOT_REFERENCED_WILDFLY_EE = { // injected by ee "jakarta.json.bind.api", - // injected by jpa - "org.hibernate.search.mapper.orm", - "org.hibernate.search.backend.elasticsearch", - "org.hibernate.search.backend.lucene", - // Used by the hibernate search that's injected by jpa - "org.elasticsearch.client.rest-client", - "com.google.code.gson", - "com.carrotsearch.hppc", - "org.apache.lucene", // Brought by galleon ServerRootResourceDefinition "wildflyee.api" }; From c84c6708e130710e8a8c4a8c4fb820eb6151c545 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 18 Sep 2023 17:12:09 -0500 Subject: [PATCH 30/36] [WFLY-18332] Don't assume no-layer modules are unreferenced as WFCORE-6481 makes that untrue --- .../test/layers/expansion/LayersTestCase.java | 14 +- .../as/test/layers/base/LayersTestCase.java | 14 +- .../jboss/as/test/shared/LayersTestBase.java | 134 ++++++++++++------ 3 files changed, 91 insertions(+), 71 deletions(-) diff --git a/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java b/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java index 69b63c7bb622..1d1517ebd8f3 100644 --- a/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java +++ b/testsuite/layers-expansion/src/test/java/org/jboss/as/test/layers/expansion/LayersTestCase.java @@ -4,9 +4,6 @@ */ package org.jboss.as.test.layers.expansion; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; import java.util.Set; import org.jboss.as.test.shared.LayersTestBase; import org.jboss.as.test.shared.util.AssumeTestGroupUtil; @@ -15,18 +12,11 @@ public class LayersTestCase extends LayersTestBase { protected Set getExpectedUnreferenced() { String[] extra = AssumeTestGroupUtil.isWildFlyPreview() ? NOT_REFERENCED_WILDFLY_PREVIEW : NOT_REFERENCED_WILDFLY; - return new HashSet<>(List.of(concatArrays(NOT_REFERENCED_COMMON, NOT_REFERENCED_EXPANSION, extra))); + return concatArrays(NO_LAYER_OR_REFERENCE_COMMON, NOT_REFERENCED_COMMON, NOT_REFERENCED_EXPANSION, extra); } protected Set getExpectedUnusedInAllLayers() { String[] extra = AssumeTestGroupUtil.isWildFlyPreview() ? NO_LAYER_WILDFLY_PREVIEW : NO_LAYER_WILDFLY; - return new HashSet<>(List.of(concatArrays(NO_LAYER_COMMON, NO_LAYER_EXPANSION, extra))); - } - - private static String[] concatArrays(String[] common, String[] expansion, String[] pack) { - String[] result = Arrays.copyOf(common, common.length + expansion.length + pack.length); - System.arraycopy(expansion, 0, result, common.length, expansion.length); - System.arraycopy(pack, 0, result, common.length + expansion.length, pack.length); - return result; + return concatArrays(NO_LAYER_OR_REFERENCE_COMMON, NO_LAYER_COMMON, NO_LAYER_EXPANSION, extra); } } diff --git a/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java b/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java index 328581d0223a..a0948f1950b1 100644 --- a/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java +++ b/testsuite/layers/src/test/java/org/jboss/as/test/layers/base/LayersTestCase.java @@ -4,10 +4,6 @@ */ package org.jboss.as.test.layers.base; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; import java.util.Set; import org.jboss.as.test.layers.LayersTest; @@ -39,16 +35,10 @@ public void testLayers() throws Exception { } protected Set getExpectedUnreferenced() { - return new HashSet<>(List.of(concatArrays(NOT_REFERENCED_COMMON, NOT_REFERENCED_WILDFLY_EE))); + return concatArrays(NO_LAYER_OR_REFERENCE_COMMON, NOT_REFERENCED_COMMON, NO_LAYER_OR_REFERENCE_WILDFLY_EE, NOT_REFERENCED_WILDFLY_EE); } protected Set getExpectedUnusedInAllLayers() { - return new HashSet<>(List.of(concatArrays(NO_LAYER_COMMON, NO_LAYER_WILDFLY_EE))); - } - - private static String[] concatArrays(String[] common, String[] pack) { - String[] result = Arrays.copyOf(common, common.length + pack.length); - System.arraycopy(pack, 0, result, common.length, pack.length); - return result; + return concatArrays(NO_LAYER_OR_REFERENCE_COMMON, NO_LAYER_COMMON, NO_LAYER_OR_REFERENCE_WILDFLY_EE, NO_LAYER_WILDFLY_EE); } } diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 8ed3ec883556..b17d206aa0d5 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -8,8 +8,11 @@ import java.io.File; import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.jboss.as.test.layers.LayersTest; import org.junit.AfterClass; @@ -40,43 +43,6 @@ public abstract class LayersTestBase { * Packages that are always expected to be included in the return value of {@link #getExpectedUnusedInAllLayers()}. */ public static final String[] NO_LAYER_COMMON = { - // not used - "ibm.jdk", - "javax.api", - "javax.sql.api", - "javax.xml.stream.api", - "sun.jdk", - "sun.scripting", - // test-all-layers installation is non-ha and does not include layers that provide jgroups - "org.jboss.as.clustering.jgroups", - // TODO we need to add an agroal layer - "org.wildfly.extension.datasources-agroal", - "io.agroal", - // Legacy subsystems for which we will not provide layers - "org.wildfly.extension.picketlink", - "org.jboss.as.jsr77", - "org.keycloak.keycloak-adapter-subsystem", - "org.jboss.as.security", - // end legacy subsystems ^^^ - // Special support feature - "org.wildfly.security.http.sfbasic", - // TODO move eclipse link support to an external feature pack - "org.eclipse.persistence", - // RA not associated with any layer - "org.jboss.genericjms", - // Appclient support is not provided by a layer - "org.jboss.as.appclient", - "org.jboss.metadata.appclient", - // TODO WFLY-16576 -- cruft? - "org.bouncycastle", - // This was brought in as part an RFE, WFLY-10632 & WFLY-10636. While the module is currently marked as private, - // for now we should keep this module. - "org.jboss.resteasy.resteasy-rxjava2", - // TODO these implement SPIs from RESTEasy or JBoss WS but I don't know how they integrate - // as there is no ref to them in any module.xml nor any in WF java code. - // Perhaps via deployment descriptor? In any case, no layer provides them - "org.wildfly.security.jakarta.client.resteasy", - "org.wildfly.security.jakarta.client.webservices", // Alternative messaging protocols besides the std Artemis core protocol // Use of these depends on an attribute value setting "org.apache.activemq.artemis.protocol.amqp", @@ -85,26 +51,17 @@ public abstract class LayersTestBase { "org.apache.activemq.artemis.protocol.stomp", // Legacy client not associated with any layer "org.hornetq.client", - // TODO we need to add an rts layer - "org.wildfly.extension.rts", - "org.jboss.narayana.rts", // TODO we need to add an xts layer "org.jboss.as.xts", // TODO should an undertow layer specify this? "org.wildfly.event.logger", - //xerces dependency is eliminated from different subsystems and use JDK JAXP instead - "org.apache.xerces", }; /** * Included in the return value of {@link #getExpectedUnusedInAllLayers()} * only when testing provisioning directly from the wildfly-ee feature pack. */ - public static final String[] NO_LAYER_WILDFLY_EE = { - // In wildfly-ee only referenced by the - // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 - "io.reactivex.rxjava2.rxjava" - }; + public static final String[] NO_LAYER_WILDFLY_EE = {}; /** * Included in the return value of {@link #getExpectedUnusedInAllLayers()} @@ -191,6 +148,8 @@ public abstract class LayersTestBase { // WFLY-8770 jgroups-aws layer modules needed to configure the aws.S3_PING protocol are not referenced "org.jgroups.aws", "software.amazon.awssdk.s3", + // TODO Move this to NO_LAYER_OR_REFERENCE_COMMON as part of the WFLY-18519 fix + "org.jboss.as.security", }; @@ -266,6 +225,87 @@ public abstract class LayersTestBase { "org.wildfly.extension.metrics", }; + /** + * Packages that are always expected to be included in the return value of both + * {@link #getExpectedUnusedInAllLayers()} and {@link #getExpectedUnreferenced()}. + */ + public static final String[] NO_LAYER_OR_REFERENCE_COMMON = { + // deprecated and unused + "ibm.jdk", + "javax.api", + "javax.sql.api", + "javax.xml.stream.api", + "sun.jdk", + "sun.scripting", + // Special support status -- wildfly-elytron-http-stateful-basic + "org.wildfly.security.http.sfbasic", + // test-all-layers installation is non-ha and does not include layers that provide jgroups + "org.jboss.as.clustering.jgroups", + // TODO we need to add an agroal layer + "org.wildfly.extension.datasources-agroal", + "io.agroal", + // Legacy subsystems for which we will not provide layers + "org.wildfly.extension.picketlink", + "org.jboss.as.jsr77", + "org.keycloak.keycloak-adapter-subsystem", + // end legacy subsystems ^^^ + // TODO move eclipse link support to an external feature pack + "org.eclipse.persistence", + // RA not associated with any layer + "org.jboss.genericjms", + // Appclient support is not provided by a layer + "org.jboss.as.appclient", + "org.jboss.metadata.appclient", + // TODO WFLY-16576 -- cruft? + "org.bouncycastle", + // This was brought in as part an RFE, WFLY-10632 & WFLY-10636. While the module is currently marked as private, + // for now we should keep this module. + "org.jboss.resteasy.resteasy-rxjava2", + // TODO these implement SPIs from RESTEasy or JBoss WS but I don't know how they integrate + // as there is no ref to them in any module.xml nor any in WF java code. + // Perhaps via deployment descriptor? In any case, no layer provides them + "org.wildfly.security.jakarta.client.resteasy", + "org.wildfly.security.jakarta.client.webservices", + // TODO we need to add an rts layer + "org.wildfly.extension.rts", + "org.jboss.narayana.rts", + //xerces dependency is eliminated from different subsystems and use JDK JAXP instead + "org.apache.xerces", + }; + + /** + * Included in the return value of both {@link #getExpectedUnusedInAllLayers()} + * and {@link #getExpectedUnreferenced()}, but only when testing provisioning + * directly from the wildfly-ee feature pack. + */ + public static final String[] NO_LAYER_OR_REFERENCE_WILDFLY_EE = { + // In wildfly-ee only referenced by the + // unused-in-all-layers org.jboss.resteasy.resteasy-rxjava2 + "io.reactivex.rxjava2.rxjava" + }; + + /** + * Utility method to combine various module name arrays into sets for use + * as parameters to this class' methods. + * + * @param first the first array to combine. Cannot be {@code null} + * @param others other arrays to combine. Can be {@code null} + * @return a set containing all of the elements in the arrays + */ + @SuppressWarnings("SameParameterValue") + protected static Set concatArrays(String[] first, String[]... others) { + // TODO Delegate to LayersTest.concatArrays once WFCORE-6481 is integrated + if (others == null || others.length == 0) { + return new HashSet<>(Arrays.asList(first)); + } else { + Stream stream = Arrays.stream(first); + for (String[] array : others) { + stream = Stream.concat(stream, Arrays.stream(array)); + } + return stream.collect(Collectors.toSet()); + } + } + /** * A HashMap to configure a banned module. * They key is the banned module name, the value is an optional List with the installation names that are allowed to From 5cb01d2a419be4e89c16c16a4e997e8b07c59b52 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 18 Sep 2023 17:13:05 -0500 Subject: [PATCH 31/36] [WFLY-18332] jakarta.json.bin.api is referenced by org.jboss.resteasy.resteasy-json-binding-provider --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index b17d206aa0d5..4db4b996d295 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -158,8 +158,6 @@ public abstract class LayersTestBase { * only when testing provisioning directly from the wildfly-ee feature pack. */ public static final String[] NOT_REFERENCED_WILDFLY_EE = { - // injected by ee - "jakarta.json.bind.api", // Brought by galleon ServerRootResourceDefinition "wildflyee.api" }; From 05697f8d9c4bff85c3729965041607cd9f725714 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Thu, 21 Sep 2023 19:25:58 -0500 Subject: [PATCH 32/36] [WFLY-18519] The org.jboss.as.security module is no longer referenced --- .../java/org/jboss/as/test/shared/LayersTestBase.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 4db4b996d295..d57f5dd63f96 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -55,6 +55,10 @@ public abstract class LayersTestBase { "org.jboss.as.xts", // TODO should an undertow layer specify this? "org.wildfly.event.logger", + // Legacy extension not in ootb standalone.xml extension list + // and not in test-all-layers as it is admin-only + // TODO move to NO_LAYER_OR_REFERENCE_COMMON when the WFCORE-6591 is integrated + "org.jboss.as.security", }; /** @@ -148,8 +152,6 @@ public abstract class LayersTestBase { // WFLY-8770 jgroups-aws layer modules needed to configure the aws.S3_PING protocol are not referenced "org.jgroups.aws", "software.amazon.awssdk.s3", - // TODO Move this to NO_LAYER_OR_REFERENCE_COMMON as part of the WFLY-18519 fix - "org.jboss.as.security", }; @@ -242,7 +244,8 @@ public abstract class LayersTestBase { // TODO we need to add an agroal layer "org.wildfly.extension.datasources-agroal", "io.agroal", - // Legacy subsystems for which we will not provide layers + // Legacy subsystems for which we will not provide layers. + // Not in the ootb standalone.xml extension list "org.wildfly.extension.picketlink", "org.jboss.as.jsr77", "org.keycloak.keycloak-adapter-subsystem", From 69f8fddf815b616902b5c9eb94a1e7cc02ac3097 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 7 Nov 2023 13:58:59 -0600 Subject: [PATCH 33/36] [WFLY-18644] WildFly no longer provides xerces --- .../src/main/java/org/jboss/as/test/shared/LayersTestBase.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index d57f5dd63f96..274e6452eda6 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -270,8 +270,6 @@ public abstract class LayersTestBase { // TODO we need to add an rts layer "org.wildfly.extension.rts", "org.jboss.narayana.rts", - //xerces dependency is eliminated from different subsystems and use JDK JAXP instead - "org.apache.xerces", }; /** From 1e2524851d2ec3509e3faf649645247a31c8c08d Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 7 Nov 2023 15:19:06 -0600 Subject: [PATCH 34/36] [WFLY-18332] The mod_cluster extension is not in the default config --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 274e6452eda6..3438cd47ca37 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -152,6 +152,12 @@ public abstract class LayersTestBase { // WFLY-8770 jgroups-aws layer modules needed to configure the aws.S3_PING protocol are not referenced "org.jgroups.aws", "software.amazon.awssdk.s3", + // Extension not included in the default config + "org.jboss.mod_cluster.container.spi", + "org.jboss.mod_cluster.core", + "org.jboss.mod_cluster.load.spi", + "org.wildfly.extension.mod_cluster", + "org.wildfly.mod_cluster.undertow" }; From 2d6e35f890a897497e17898a3db7b3e9429dc803 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 7 Nov 2023 17:16:35 -0600 Subject: [PATCH 35/36] [WFLY-18332] The MP Metrics and MP OpenTracing extensions are no longer referenced --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index 3438cd47ca37..d4461723309d 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -205,6 +205,10 @@ public abstract class LayersTestBase { "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye", "org.wildfly.reactive.mutiny.reactive-streams-operators.cdi-provider", "io.vertx.client", + // Extension not included in the default config + "org.wildfly.extension.microprofile.metrics-smallrye", + // Extension not included in the default config + "org.wildfly.extension.microprofile.opentracing-smallrye", // Injected by jaxrs subsystem "org.jboss.resteasy.microprofile.config", "org.jboss.resteasy.resteasy-client-microprofile", From c022d39d199b058238fff8a71611f00576117a50 Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Tue, 7 Nov 2023 17:18:04 -0600 Subject: [PATCH 36/36] [WFLY-18332] The wildflyee module is provisioned by all feature packs, and isn't referenced --- .../main/java/org/jboss/as/test/shared/LayersTestBase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java index d4461723309d..6f8cb805e04c 100644 --- a/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java +++ b/testsuite/shared/src/main/java/org/jboss/as/test/shared/LayersTestBase.java @@ -157,7 +157,9 @@ public abstract class LayersTestBase { "org.jboss.mod_cluster.core", "org.jboss.mod_cluster.load.spi", "org.wildfly.extension.mod_cluster", - "org.wildfly.mod_cluster.undertow" + "org.wildfly.mod_cluster.undertow", + // Brought by galleon ServerRootResourceDefinition + "wildflyee.api" }; @@ -166,8 +168,6 @@ public abstract class LayersTestBase { * only when testing provisioning directly from the wildfly-ee feature pack. */ public static final String[] NOT_REFERENCED_WILDFLY_EE = { - // Brought by galleon ServerRootResourceDefinition - "wildflyee.api" };