From 5eb14d77488fa183569284b847ad00b4a8857590 Mon Sep 17 00:00:00 2001 From: WolfgangHG Date: Tue, 22 Oct 2024 21:23:11 +0200 Subject: [PATCH] Restore testsuite for Glassfish 7, switch to "org.omnifaces.arquillian" container --- .github/workflows/ci.yml | 3 +-- build/ftest-base/pom.xml | 18 ++++++++++++------ .../producer/TestJSFResourceNotFound.java | 7 ++++--- pom.xml | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a57a010..6b3307c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,7 @@ jobs: - 23 container: - wildfly-managed - # TODO GlassFish 5 is not compatible with JDK 9 and newer - # - glassfish-managed + - glassfish-managed - tomee-managed exclude: # TomEE 10 requires Java 17. diff --git a/build/ftest-base/pom.xml b/build/ftest-base/pom.xml index 7a92d205..a915087f 100644 --- a/build/ftest-base/pom.xml +++ b/build/ftest-base/pom.xml @@ -15,7 +15,7 @@ 1.2.6 2.0.0 - 1.0.2 + 1.6 false @@ -250,14 +250,20 @@ true - ${project.build.directory}/glassfish5 + ${project.build.directory}/glassfish7 org.glassfish.main.distributions:glassfish:zip:${version.glassfish} + + + - org.jboss.arquillian.container - arquillian-glassfish-managed-3.1 + org.omnifaces.arquillian + arquillian-glassfish-server-managed ${version.arquillian.glassfish} test @@ -295,8 +301,8 @@ - org.jboss.arquillian.container - arquillian-glassfish-remote-3.1 + org.omnifaces.arquillian + arquillian-glassfish-server-remote ${version.arquillian.glassfish} test diff --git a/extension/jsf-ftest/src/test/java/org/jboss/arquillian/warp/jsf/ftest/producer/TestJSFResourceNotFound.java b/extension/jsf-ftest/src/test/java/org/jboss/arquillian/warp/jsf/ftest/producer/TestJSFResourceNotFound.java index 11b8aaa5..ee79c691 100644 --- a/extension/jsf-ftest/src/test/java/org/jboss/arquillian/warp/jsf/ftest/producer/TestJSFResourceNotFound.java +++ b/extension/jsf-ftest/src/test/java/org/jboss/arquillian/warp/jsf/ftest/producer/TestJSFResourceNotFound.java @@ -16,6 +16,7 @@ */ package org.jboss.arquillian.warp.jsf.ftest.producer; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.net.URL; @@ -31,7 +32,6 @@ import org.jboss.arquillian.warp.Warp; import org.jboss.arquillian.warp.WarpTest; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; import org.junit.runner.RunWith; @@ -51,11 +51,12 @@ public class TestJSFResourceNotFound { @Deployment public static WebArchive createDeployment() { return ShrinkWrap.create(WebArchive.class, "jsf-test.war") - .addAsWebInfResource(new StringAsset(""), "faces-config.xml") + .addAsWebInfResource(new File("src/main/webapp/WEB-INF/faces-config.xml")) + .addAsWebInfResource(new File("src/main/webapp/WEB-INF/beans.xml")) //The test for GlassFish will fail without "web.xml" with a "java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:10186/jsf-test/faces/notExisting.xhtml" //instead of the expected "FileNotFoundException". //On other servers, it works as expected. - .addAsWebInfResource(new java.io.File("src/main/webapp/WEB-INF/web.xml")); + .addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml")); } @Test diff --git a/pom.xml b/pom.xml index 6fc522e2..a300466b 100644 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,7 @@ The version can be found in "bin/servlet-api.jar" It does not have to match exactly the version bundled with TomEE, but it should be at least the same JakartaEE spec version.--> 10.1.30 - 5.1.0 + 7.0.18 33.0.0.Final 5.0.1.Final