From 6516bba9bd2dc2ab536c420fcb10193cc45c0c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20R=C3=BCtter?= Date: Fri, 9 Oct 2026 09:38:09 +0200 Subject: [PATCH 1/2] FELIX-6869 - Let the HTTP integration tests run on a current JDK The integration tests cannot run on JDK 27. JettySniHostCheckIT times out after 30 seconds waiting for an HttpService that never registers, and the container log gives the reason: org.apache.aries.spifly.dynamic.bundle [Events.Framework] ERROR java.lang.ClassFormatError: Weaving hook failed. Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 71 AbstractJettyTestSupport.spifly() provisions ASM as separate bundles pinned to 9.7, and Aries SpiFly wires to them through its import of org.objectweb.asm;version="[9.6,10)". ASM 9.7 only knows up to class file 67 (Java 23), so on JDK 27 SpiFly's weaving hook throws for every class it is asked to weave and Jetty never finishes starting. The ASM bundles move to 9.10.1, which declares V27 = 71 and still satisfies SpiFly's import range, so SpiFly itself does not change. Bumping SpiFly to 1.3.8 instead does not work: its imports changed and the test container is then left with unresolved bundles. Nothing here is specific to SNI or TLS. The test keystore is current (PBES2/AES-256, 2048-bit RSA, SHA384withRSA) and Jetty starts normally up to the weaving failure; JettySniHostCheckIT is just the test that waits on a service that never arrives. Verified on JDK 21: the full jetty12 build passes, 21 integration tests, and the full jetty build passes, 4 integration tests. Co-Authored-By: Claude Opus 5 --- .../felix/http/jetty/it/AbstractJettyTestSupport.java | 10 +++++----- .../felix/http/jetty/it/AbstractJettyTestSupport.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/http/jetty/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java b/http/jetty/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java index 76fa6899a9..e20d772a7d 100644 --- a/http/jetty/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java +++ b/http/jetty/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java @@ -175,11 +175,11 @@ protected ModifiableCompositeOption optionalRemoteDebug() { public static ModifiableCompositeOption spifly() { return composite( mavenBundle().groupId("org.apache.aries.spifly").artifactId("org.apache.aries.spifly.dynamic.bundle").version("1.3.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-analysis").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-commons").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-tree").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-util").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm").version("9.7") + mavenBundle().groupId("org.ow2.asm").artifactId("asm-analysis").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm-commons").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm-tree").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm-util").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm").version("9.10.1") ); } } diff --git a/http/jetty12/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java b/http/jetty12/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java index ce9e7512dc..47c305ef0f 100644 --- a/http/jetty12/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java +++ b/http/jetty12/src/test/java/org/apache/felix/http/jetty/it/AbstractJettyTestSupport.java @@ -175,11 +175,11 @@ protected ModifiableCompositeOption optionalRemoteDebug() { public static ModifiableCompositeOption spifly() { return composite( mavenBundle().groupId("org.apache.aries.spifly").artifactId("org.apache.aries.spifly.dynamic.bundle").version("1.3.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-analysis").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-commons").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-tree").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm-util").version("9.7"), - mavenBundle().groupId("org.ow2.asm").artifactId("asm").version("9.7") + mavenBundle().groupId("org.ow2.asm").artifactId("asm-analysis").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm-commons").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm-tree").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm-util").version("9.10.1"), + mavenBundle().groupId("org.ow2.asm").artifactId("asm").version("9.10.1") ); } } From 6c02bccdc29d6f2ddcaf9983429b898d22205747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20R=C3=BCtter?= Date: Fri, 9 Oct 2026 09:51:30 +0200 Subject: [PATCH 2/2] FELIX-6869 - Run the HTTP integration tests on the framework in this repository The integration tests pinned org.apache.felix.framework 7.0.5, so pax-exam always started them on that released framework rather than the one built here. They therefore could not catch a framework regression, and did not: the FilterImpl.WrapperCapability fix this change is stacked on repairs Filter.matches(Map), which had been throwing for any non-empty map, and with that bug present JettySniHostCheckIT fails with 404 instead of 200 because the whiteboard servlet never registers. On 7.0.5 it passes, which is why nobody noticed. The version becomes a felix.framework.version property, still defaulting to the latest release so each module continues to build on its own, and CI overrides it with the version it just built: FRAMEWORK_VERSION=$(mvn ... help:evaluate -Dexpression=project.version ...) mvn ... -Dfelix.framework.version=$FRAMEWORK_VERSION For that to work the framework has to be installed first, so the Felix Framework step moves ahead of Felix HTTP and runs when either framework or http changed. It already used install rather than verify for the TCK, which resolves the framework from the repository for the same reason. Verified against the framework built here, 7.1.0-SNAPSHOT: jetty12 passes 21 integration tests and jetty passes 4. Co-Authored-By: Claude Opus 5 --- .github/workflows/maven-ci.yml | 18 ++++++++++-------- http/jetty/pom.xml | 9 ++++++++- http/jetty12/pom.xml | 9 ++++++++- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 83969f829d..4a3fb36c4d 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -76,9 +76,18 @@ jobs: - name: Felix Log if: steps.changes.outputs.log == 'true' run: mvn -B -V -Dstyle.color=always --file log/pom.xml clean verify + # Built and installed before Felix HTTP, whose integration tests run on it. + # Also runs when only http changed, so those tests always exercise the framework + # in this repository rather than the last release. See FELIX-6869. + - name: Felix Framework + if: steps.changes.outputs.framework == 'true' || steps.changes.outputs.http == 'true' + run: mvn -B -V -Dstyle.color=always --file framework/pom.xml clean install - name: Felix HTTP if: steps.changes.outputs.http == 'true' - run: mvn -B -V -Dstyle.color=always "-Dit.test=!MissingWebsocketDependenciesIT" --file http/pom.xml clean install verify "-Dmaven.repo.local=/home/runner/.m2/repository/" + run: | + FRAMEWORK_VERSION=$(mvn -B -q --file framework/pom.xml help:evaluate -Dexpression=project.version -DforceStdout) + echo "Running the integration tests against framework $FRAMEWORK_VERSION" + mvn -B -V -Dstyle.color=always "-Dit.test=!MissingWebsocketDependenciesIT" --file http/pom.xml clean install verify "-Dmaven.repo.local=/home/runner/.m2/repository/" "-Dfelix.framework.version=$FRAMEWORK_VERSION" - name: Felix Maven bundle plugin if: steps.changes.outputs.maven-bundle-plugin == 'true' run: mvn -B -V -Dstyle.color=always --file tools/maven-bundle-plugin/pom.xml clean install verify @@ -88,13 +97,6 @@ jobs: - name: Felix Webconsole if: steps.changes.outputs.webconsole == 'true' run: mvn -B -V -Dstyle.color=always --file webconsole/pom.xml clean install verify - - name: Felix Framework - if: steps.changes.outputs.framework == 'true' - # install, not verify: the TCK below is a separate Maven invocation and resolves - # the framework from the repository, so without installing it silently tests - # whatever org.apache.felix.framework is published rather than the build under - # test. - run: mvn -B -V -Dstyle.color=always --file framework/pom.xml clean install - name: OSGi-TCK Framework if: steps.changes.outputs.framework == 'true' run: mvn -B -V -Dstyle.color=always --file framework.tck/pom.xml clean verify diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml index fd71a5dfd5..5fc1449a49 100644 --- a/http/jetty/pom.xml +++ b/http/jetty/pom.xml @@ -45,6 +45,13 @@ 11.0.26 true 4.13.3 + + 7.0.5 -Xmx512M @@ -523,7 +530,7 @@ org.apache.felix org.apache.felix.framework - 7.0.5 + ${felix.framework.version} test diff --git a/http/jetty12/pom.xml b/http/jetty12/pom.xml index cfdc5bbb94..5d8d4e4b4a 100644 --- a/http/jetty12/pom.xml +++ b/http/jetty12/pom.xml @@ -49,6 +49,13 @@ 2.0.17 false 4.13.3 + + 7.0.5 -Xmx512M @@ -701,7 +708,7 @@ org.apache.felix org.apache.felix.framework - 7.0.5 + ${felix.framework.version} test