Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ jobs:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn --no-transfer-progress install -Pstaging
run: mvn --no-transfer-progress install -Pstaging -pl cdi,impl,action,rest -am
- name: Run integration tests
run: mvn --no-transfer-progress -f test/pom.xml -T2 install -Pstaging
Empty file added test/.mvn/.gitkeep
Empty file.
9 changes: 4 additions & 5 deletions test/perf/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ pipeline {
</settings>'''
// The bench bundles this freshly installed jar into the WAR, so it must be installed
// before either arm runs. `clean` is mandatory: a packaged artifact is never built
// incrementally. test/pom.xml activates its glassfish profile by default, whose
// unpack-glassfish execution runs at pre-integration-test -- a phase `install` passes
// through -- so it is deactivated here: installing the IT base needs no server, and
// incrementally. test/pom.xml activates its glassfish-pool profile by default, whose
// pool-up execution boots a server at initialize, so it is deactivated here: installing the IT base needs no server, and
// the bench stages provision Tomcat themselves.
script {
if (LINE_CONFIG[params.RELEASE_LINE].apiSubmodule) {
Expand All @@ -173,10 +172,10 @@ pipeline {
// rather than from a reactor, so util's parent pom has to be installed as
// well: building util alongside it only reads that parent off disk.
sh "mvn ${env.MVN_EXTRA} -N -f faces/tck/pom.xml clean install ${env.SKIP_FLAGS}"
sh "mvn ${env.MVN_EXTRA} -P '!glassfish' -f test/pom.xml -pl base -am clean install ${env.SKIP_FLAGS}"
sh "mvn ${env.MVN_EXTRA} -P '!glassfish-pool' -f test/pom.xml -pl base -am clean install ${env.SKIP_FLAGS}"
}
else {
sh "mvn ${env.MVN_EXTRA} -P '!glassfish' -pl impl,test/base -am clean install ${env.SKIP_FLAGS}"
sh "mvn ${env.MVN_EXTRA} -P '!glassfish-pool' -pl impl,test/base -am clean install ${env.SKIP_FLAGS}"
}
}
// Both arms stash their dump here, outside the target/ that the next arm's `clean` wipes.
Expand Down
8 changes: 4 additions & 4 deletions test/perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build time, so re-run this after every impl change you want reflected.
Everything else runs from inside the module — `cd test/perf` first, then:

```
mvn clean verify -Dperf=true # GlassFish (default)
mvn clean verify -Dperf=true -Pglassfish # GlassFish
mvn clean verify -Dperf=true -Pwildfly # WildFly
mvn clean verify -Dperf=true -Ptomee # TomEE Plume
mvn clean verify -Dperf=true -Ppayara # Payara
Expand All @@ -40,7 +40,7 @@ mvn clean verify -Dperf=true -Pliberty-myfaces # OpenLiberty
mvn clean verify -Dperf=true -Ptomcat-myfaces # Tomcat (+ Weld + Hibernate Validator)

# Tune iteration counts (warmup=50, runs=1000 by default):
mvn clean verify -Dperf=true -Dperf.warmup=200 -Dperf.runs=2000
mvn clean verify -Dperf=true -Dperf.warmup=200 -Dperf.runs=2000 -Pglassfish
```

The IT is gated behind `-Dperf=true` (same convention as
Expand All @@ -54,15 +54,15 @@ per-phase table (count / total_us / avg_us / min_us / max_us) plus an aggregate

## Servers

The server is selected with `-P`; GlassFish is the default profile. Each profile
The server is selected with `-P`, and the bench requires one: the default profile is the shared `glassfish-pool`, which rejects `-Dperf=true`. Each profile
provisions its own server under `target/` and supplies the chosen Mojarra jar —
either overlaid into the server's modules (GlassFish, Payara, WildFly, TomEE) or,
for the bare servlet containers that ship no Faces implementation, bundled into
the WAR's `WEB-INF/lib` (OpenLiberty, Tomcat).

| profile | server | provisioned into | version property |
|-----------------|-----------------|----------------------------------|-----------------------------------|
| *(default)* | GlassFish | `target/glassfish8` | `-Dglassfish.version` (8.0.3) |
| `-Pglassfish` | GlassFish | `target/glassfish8` | `-Dglassfish.version` (8.0.3) |
| `-Pwildfly` | WildFly | `target/wildfly` | `-Dwildfly.version` (40.0.0.Final) |
| `-Ptomee` | TomEE Plume | `target/apache-tomee-plume-*` | `-Dtomee.version` (10.1.5) |
| `-Ppayara` | Payara | `target/payara7` | `-Dpayara.version` (7.2026.5) |
Expand Down
124 changes: 123 additions & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@

<properties>
<arquillian.version>1.10.2.Final</arquillian.version>
<arquillian.glassfish.version>2.2.1</arquillian.glassfish.version>
<arquillian.browser>chrome</arquillian.browser>
<mojarra.version>${project.version}</mojarra.version>
<myfaces.version>4.1.4-SNAPSHOT</myfaces.version> <!-- consumed by the *-myfaces profiles -->
Expand Down Expand Up @@ -168,6 +169,16 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
Expand Down Expand Up @@ -209,10 +220,121 @@

<profiles>
<profile>
<id>glassfish</id>
<id>glassfish-pool</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<perf>false</perf>
<gf.pool.size>1</gf.pool.size>
<gf.pool.dir>${maven.multiModuleProjectDirectory}/target/pool</gf.pool.dir>
<gf.pool.dist>${maven.multiModuleProjectDirectory}/target/dist</gf.pool.dist>
<gf.pool.source>${gf.pool.dist}/glassfish8</gf.pool.source>
<gf.pool.adminBase>14848</gf.pool.adminBase>
<gf.pool.portStride>100</gf.pool.portStride>
<gf.pool.restartOnRelease>false</gf.pool.restartOnRelease>
</properties>
<dependencies>
<dependency>
<groupId>ee.omnifish.arquillian</groupId>
<artifactId>arquillian-glassfish-server-pool</artifactId>
<version>${arquillian.glassfish.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ee.omnifish.arquillian</groupId>
<artifactId>glassfish-client-ee11</artifactId>
<version>${arquillian.glassfish.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>reject-perf-on-pool</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>perf</property>
<regex>false</regex>
<regexMessage>The perf bench needs a server of its own with an aligned heap. Name the server, e.g. -Pglassfish.</regexMessage>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>ee.omnifish.arquillian</groupId>
<artifactId>glassfish-pool-maven-plugin</artifactId>
<version>${arquillian.glassfish.version}</version>
<configuration>
<poolDir>${gf.pool.dir}</poolDir>
<poolSource>${gf.pool.source}</poolSource>
<poolSize>${gf.pool.size}</poolSize>
<adminPortBase>${gf.pool.adminBase}</adminPortBase>
<portStride>${gf.pool.portStride}</portStride>
<stageDir>${gf.pool.dist}</stageDir>
<distribution>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>${glassfish.version}</version>
<type>zip</type>
</distribution>
<overlays>
<overlay>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.faces</artifactId>
<version>${mojarra.version}</version>
<destFileName>jakarta.faces.jar</destFileName>
</overlay>
</overlays>
</configuration>
<executions>
<execution>
<id>pool-up</id>
<phase>initialize</phase>
<goals>
<goal>up</goal>
</goals>
</execution>
<!-- Only the root aggregator may stop slots: a per-module pre-clean would stop slots which a parallel module is testing against. -->
<execution>
<id>pool-down-before-clean</id>
<phase>pre-clean</phase>
<inherited>false</inherited>
<goals>
<goal>down</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<gf.pool.dir>${gf.pool.dir}</gf.pool.dir>
<gf.pool.source>${gf.pool.source}</gf.pool.source>
<gf.pool.adminBase>${gf.pool.adminBase}</gf.pool.adminBase>
<gf.pool.portStride>${gf.pool.portStride}</gf.pool.portStride>
<gf.pool.restartOnRelease>${gf.pool.restartOnRelease}</gf.pool.restartOnRelease>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>glassfish</id>
<properties>
<glassfish.home>glassfish8</glassfish.home>
</properties>
Expand Down
Loading