Skip to content

Commit

Permalink
Merge pull request #252 from WolfgangHG/glassfish7
Browse files Browse the repository at this point in the history
Restore testsuite for Glassfish 7, switch to "org.omnifaces.arquillia…
  • Loading branch information
rhusar authored Oct 23, 2024
2 parents 6f3196b + 5eb14d7 commit 8fef86e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 12 additions & 6 deletions build/ftest-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<version.shrinkwrap>1.2.6</version.shrinkwrap>
<version.shrinkwrap.descriptors>2.0.0</version.shrinkwrap.descriptors>
<version.arquillian.glassfish>1.0.2</version.arquillian.glassfish>
<version.arquillian.glassfish>1.6</version.arquillian.glassfish>

<!-- Arquillian Configuration -->
<arquillian.debug>false</arquillian.debug>
Expand Down Expand Up @@ -250,14 +250,20 @@
</activation>
<properties>
<arquillian.launch.glassfish>true</arquillian.launch.glassfish>
<arquillian.container.home>${project.build.directory}/glassfish5</arquillian.container.home>
<arquillian.container.home>${project.build.directory}/glassfish7</arquillian.container.home>
<arquillian.container.distribution>org.glassfish.main.distributions:glassfish:zip:${version.glassfish}
</arquillian.container.distribution>
</properties>

<dependencies>

<!--The original glassfish container is abandoned and does not support glassfish 7
(https://github.com/arquillian/arquillian-container-glassfish and https://github.com/arquillian/arquillian-container-glassfish6),
so use a fork at https://github.com/OmniFish-EE/arquillian-container-glassfish <dependency>
-->
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-managed-3.1</artifactId>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>arquillian-glassfish-server-managed</artifactId>
<version>${version.arquillian.glassfish}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -295,8 +301,8 @@
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-remote-3.1</artifactId>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>arquillian-glassfish-server-remote</artifactId>
<version>${version.arquillian.glassfish}</version>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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 version=\"2.0\" xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd\"></faces-config>"), "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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.-->
<version.tomee.tomcat>10.1.30</version.tomee.tomcat>
<version.glassfish>5.1.0</version.glassfish>
<version.glassfish>7.0.18</version.glassfish>
<version.wildfly>33.0.0.Final</version.wildfly>
<version.wildfly.arquillian.container>5.0.1.Final</version.wildfly.arquillian.container>

Expand Down

0 comments on commit 8fef86e

Please sign in to comment.