Skip to content

Commit

Permalink
Merge pull request #246 from simonladen/FISH-8905-add-pipeline-p7
Browse files Browse the repository at this point in the history
FISH-8905 - add pipeline p7
  • Loading branch information
simonladen authored Aug 5, 2024
2 parents a56aeb9 + 2a57eb2 commit 8922d92
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 45 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/verify_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Verify PR

on:
pull_request:
branches: [ master, Payara6, Payara4 ]
branches: [ master, Payara6, Payara4, Payara7 ]
paths-ignore:
- 'README.*'
- '**/README.*'
Expand All @@ -18,11 +18,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
java-version: 21

- name: Cache repository
uses: actions/cache@v2
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Build with Maven
env:
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.rto=30000 -Djava.net.preferIPv4Stack=true
run: mvn -B -V clean verify
run: mvn -B -V clean install

- name: Archive logs on failure
if: failure()
Expand Down
133 changes: 99 additions & 34 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,6 @@
<artifactId>integration-tests</artifactId>
<name>Integration Tests</name>

<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-embedded</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-managed</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-micro-managed</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-micro-remote</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>payara-micro-deployer</artifactId>
<type>war</type>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -118,4 +84,103 @@
</plugin>
</plugins>
</build>


<profiles>
<profile>
<id>payara-server-embedded</id>
<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-embedded</artifactId>
<version>${container.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-embedded-all</artifactId>
<version>${payara.embedded.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>payara-server-managed</id>
<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-managed</artifactId>
<version>${container.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>payara-micro-managed-copied</id>
<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-micro-managed</artifactId>
<version>${container.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>payara-micro-managed-classpath</id>
<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-micro-managed</artifactId>
<version>${container.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-micro</artifactId>
<version>${payara.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>payara-server-remote</id>
<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>payara-client-ee11</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-remote</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>payara-micro-remote</id>
<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-micro-remote</artifactId>
<version>${container.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>payara-micro-deployer</artifactId>
<version>${container.version}</version>
<scope>test</scope>
<type>war</type>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
48 changes: 44 additions & 4 deletions integration-tests/src/it/microprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@

<properties>
<!-- This is Java 11 project -->
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<container.version>@project.version@</container.version>
<payara.version>@payara.version@</payara.version>
<payara.embedded.version>@version.payara.embedded@</payara.embedded.version>
</properties>

<build>
Expand All @@ -130,6 +131,13 @@
</goals>
<configuration>
<failIfNoTests>true</failIfNoTests>
<argLine>
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED
</argLine>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -158,7 +166,7 @@
<dependency>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-embedded-all</artifactId>
<version>${payara.version}</version>
<version>${payara.embedded.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -223,7 +231,7 @@
<configuration>
<systemPropertyVariables>
<!-- Pass location of server installation to arquillian container -->
<payara.home>${session.executionRootDirectory}/target/payara6</payara.home>
<payara.home>${session.executionRootDirectory}/target/payara7</payara.home>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down Expand Up @@ -306,6 +314,38 @@

</profile>

<profile>
<id>payara-server-remote</id>

<dependencies>
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>payara-client-ee11</artifactId>
<version>${project.version}</version>
</dependency>

<!-- The actual Arquillian connector -->
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-remote</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<javaEEServer>payara-remote</javaEEServer>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>payara-micro-remote</id>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void healthCheckUp() {
// response changed with Health 2.2 / 5.194, so let's not go into details of the message
}

/* test commented out because of FISH-9114. Payara7 Alpha1 metrics response is in plain text, not Json
@Test
public void metricMeasures() {
Client client = ClientBuilder.newClient();
Expand All @@ -108,9 +109,10 @@ public void metricMeasures() {
assertTrue("counter should be at least 1, is " + counter, counter > 0);
WebTarget metricsPath = client.target(baseUrl.resolve("/")).path("metrics");
Thread.sleep(500000);
JsonObject metrics = metricsPath
.request(MediaType.APPLICATION_JSON_TYPE).get(JsonObject.class);
assertNotNull(metrics);
assertNotNull(metrics);*/
/*
{
"base": {
Expand Down Expand Up @@ -139,13 +141,13 @@ public void metricMeasures() {
}
}
*/
JsonObject app = metrics.getJsonObject("application");
/*JsonObject app = metrics.getJsonObject("application");
String key = app.keySet().stream().filter(s -> s.contains("endpoint_counter")).findFirst().orElseThrow(() -> new AssertionError(
"endpoint_counter should be present in " + app));
assertEquals(counter,
metrics.getJsonObject("application").getJsonNumber(key).longValue());
assertNotNull(metrics.getJsonObject("application").getJsonObject("fish.payara.bomdemo.metric.MetricController.timed-request"));
}
}*/

@Test
public void configConfigures() {
Expand Down
19 changes: 19 additions & 0 deletions payara-embedded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,24 @@
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<argLine>
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 8922d92

Please sign in to comment.