Skip to content

Commit

Permalink
Merge branch 'current' into mnriem-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem authored Nov 26, 2024
2 parents 41493d1 + 4f31989 commit 81e7b3a
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ create the ```pom.xml``` file with the content as below.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cloud.piranha.guides.webprofile</groupId>
<artifactId>playwright</artifactId>
<groupId>cloud.piranha.dist.webprofile.guide</groupId>
<artifactId>junit5-and-playwright</artifactId>
<version>24.11.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Testing with JUnit 5 and Playwright</name>
<properties>
<jakartaee.version>11.0.0-M4</jakartaee.version>
<java.version>21</java.version>
<junit.version>5.10.0</junit.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
<junit.version>5.11.3</junit.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-failsafe-plugin.version>3.5.2</maven-failsafe-plugin.version>
<maven-war-plugin.version>3.4.0</maven-war-plugin.version>
<piranha.distribution>webprofile</piranha.distribution>
<piranha.version>23.9.0</piranha.version>
<playwright.version>1.38.0</playwright.version>
<piranha.version>24.11.0</piranha.version>
<playwright.version>1.48.0</playwright.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down Expand Up @@ -80,7 +80,7 @@ create the ```pom.xml``` file with the content as below.
<finalName>playwright</finalName>
<plugins>
<plugin>
<groupId>cloud.piranha.maven.plugins</groupId>
<groupId>cloud.piranha.maven</groupId>
<artifactId>piranha-maven-plugin</artifactId>
<version>${piranha.version}</version>
<executions>
Expand Down
2 changes: 2 additions & 0 deletions test/server/wasp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<rerunFailingTestsCount>100</rerunFailingTestsCount>
<systemPropertyVariables>
<httpPort>${httpPort}</httpPort>
</systemPropertyVariables>
Expand Down
2 changes: 0 additions & 2 deletions test/server/wasp/src/test/java/wasp/HelloTagJspIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
Expand All @@ -48,7 +47,6 @@ class HelloTagJspIT {
*
* @throws Exception when a serious error occurs.
*/
@Disabled
@Test
void testHelloTagJsp() throws Exception {
HttpClient client = HttpClient.newHttpClient();
Expand Down
2 changes: 0 additions & 2 deletions test/server/wasp/src/test/java/wasp/HelloTld2JspIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
Expand All @@ -48,7 +47,6 @@ class HelloTld2JspIT {
*
* @throws Exception when a serious error occurs.
*/
@Disabled
@Test
void testHelloTld2Jsp() throws Exception {
HttpClient client = HttpClient.newHttpClient();
Expand Down
2 changes: 0 additions & 2 deletions test/server/wasp/src/test/java/wasp/HelloTldJspIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
Expand All @@ -48,7 +47,6 @@ class HelloTldJspIT {
*
* @throws Exception when a serious error occurs.
*/
@Disabled
@Test
void testHelloTldJsp() throws Exception {
HttpClient client = HttpClient.newHttpClient();
Expand Down
3 changes: 0 additions & 3 deletions test/server/wasp/src/test/java/wasp/IndexJspIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import java.net.http.HttpResponse.BodyHandlers;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
Expand All @@ -49,7 +48,6 @@ class IndexJspIT {
*
* @throws Exception when a serious error occurs.
*/
@Disabled
@Test
void testIndexJsp() throws Exception {
HttpClient client = HttpClient.newHttpClient();
Expand All @@ -66,7 +64,6 @@ void testIndexJsp() throws Exception {
*
* @throws Exception when a serious error occurs.
*/
@Disabled
@Test
void testIndexJsp2() throws Exception {
HttpClient client = HttpClient.newHttpClient();
Expand Down
201 changes: 103 additions & 98 deletions test/servlet/crac/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,33 @@
<packaging>war</packaging>
<name>Piranha - Test - Servlet - CRaC application</name>
<properties>
<!-- dependencies -->
<piranha.version>${project.version}</piranha.version>
<weld.version>6.0.0.Beta4</weld.version>
<!-- other -->
<java.version>21</java.version>
<piranha.distribution>servlet</piranha.distribution>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- plugins -->
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
<maven-war-plugin.version>3.4.0</maven-war-plugin.version>
</properties>
<dependencies>
<!-- compile -->
<!-- provided -->
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- runtime -->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.faces</artifactId>
<scope>compile</scope>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-weld</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<version>${weld.version}</version>
<scope>compile</scope>
</dependency>
<!-- runtime -->
<dependency>
<groupId>cloud.piranha.extension</groupId>
<artifactId>piranha-extension-weld</artifactId>
<version>${piranha.version}</version>
<scope>runtime</scope>
</dependency>
<!-- test -->
Expand All @@ -66,86 +62,95 @@
</dependencies>
<build>
<finalName>crac</finalName>
<plugins>
<!--
<plugin>
<groupId>cloud.piranha.maven</groupId>
<artifactId>piranha-maven-plugin</artifactId>
<version>${piranha.version}</version>
<executions>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<distribution>servlet</distribution>
<httpPort>${httpPort}</httpPort>
<startTimeout>60</startTimeout>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<forkCount>1</forkCount>
<systemPropertyVariables>
<httpPort>${httpPort}</httpPort>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-network-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>package</phase>
</build>
<profiles>
<profile>
<id>unix</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>cloud.piranha.maven</groupId>
<artifactId>piranha-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<portNames>
<portName>httpPort</portName>
</portNames>
<distribution>servlet</distribution>
<httpPort>${httpPort}</httpPort>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<forkCount>1</forkCount>
<systemPropertyVariables>
<httpPort>${httpPort}</httpPort>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-network-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>validate</phase>
<configuration>
<portNames>
<portName>httpPort</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package hello;
package cloud.piranha.test.servlet.crac;

import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Named;

@Named(value = "helloBean")
@Named(value = "cracBean")
@RequestScoped
public class HelloBean {
public class CracBean {

/**
* Stores the 'Hello from CRaC!' message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@

<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="jakarta.faces.core"
xmlns:h="jakarta.faces.html"
xmlns:pt="jakarta.faces.passthrough">
xmlns:h="jakarta.faces.html">
<h:head>
<title>Jakarta Faces application</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<div>Jakarta Faces application</div>
<h:form>
<h:outputText value="#{helloBean.hello}"/>
<h:outputText value="#{cracBean.hello}"/>
<br/>
</h:form>
</h:body>
Expand Down
Loading

0 comments on commit 81e7b3a

Please sign in to comment.