Skip to content

Commit

Permalink
Upgrade Hazelcast to 5.5 [DEX-297] (#177)
Browse files Browse the repository at this point in the history
- Upgrades Hazelcast to 5.5
- Upgrades Javax -> Jakarta
- Makes tests less flaky & passing on GHA
- Updates many dependencies to refresh whole project
- Adds JUnit template to make tests less flaky locally -
`java.net.preferIPv4Stack=true`

---------

Co-authored-by: Łukasz Dziedziul <[email protected]>
Co-authored-by: Jack Green <[email protected]>
  • Loading branch information
3 people authored Feb 18, 2025
1 parent 693f28f commit 020a7b8
Show file tree
Hide file tree
Showing 21 changed files with 269 additions and 292 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/pr-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:

jobs:
build:
runs-on: ubuntu-latest
# using ubicloud instead of "standard" ubuntu-latest fixes issue with members not being able to connect via multicast
runs-on: ubicloud-standard-8

steps:
- name: Get all the letters, words and paragraphs needed for the spell!
Expand All @@ -23,3 +24,10 @@ jobs:
- name: Verify
run: |
mvn verify -B -Dmaven.test.failure.ignore=false
- name: Publish Test results
uses: EnricoMi/publish-unit-test-result-action@567cc7f8dcea3eba5da355f6ebc95663310d8a07
if: ${{ !cancelled() }}
with:
files: "**/TEST-*.xml"
large_files: true
11 changes: 11 additions & 0 deletions .officialRun/Template JUnit.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="true" type="JUnit" factoryName="JUnit">
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea -Djava.net.preferIPv4Stack=true" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
48 changes: 0 additions & 48 deletions build.xml

This file was deleted.

159 changes: 84 additions & 75 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright 2024 Hazelcast Inc.
~ Copyright 2025 Hazelcast Inc.
~
~ Licensed under the Hazelcast Community License (the "License"); you may not use
~ this file except in compliance with the License. You may obtain a copy of the
Expand Down Expand Up @@ -31,35 +31,37 @@
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
<timestamp>${maven.build.timestamp}</timestamp>

<hazelcast.version>5.4.0</hazelcast.version>
<hazelcast.version>5.5.0</hazelcast.version>

<log4j.version>3.0.0-beta2</log4j.version>
<junit.version>4.13.2</junit.version>
<assertj.version>3.26.0</assertj.version>
<opentest4j.version>1.3.0</opentest4j.version>

<jsp.api.version>4.0.0</jsp.api.version>
<servlet.api.version>6.1.0</servlet.api.version>
<org.springframework.version>6.1.14</org.springframework.version>
<spring-security.version>6.3.4</spring-security.version>
<jetty.maven.plugin.version>11.0.21</jetty.maven.plugin.version>

<org.springframework.version>6.2.1</org.springframework.version>
<spring-security.version>6.4.2</spring-security.version>
<jetty.maven.plugin.version>11.0.24</jetty.maven.plugin.version>
<tomcat.version>11.0.2</tomcat.version>
<httpclient.version>4.5.13</httpclient.version>

<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.jar.plugin.version>2.4</maven.jar.plugin.version>
<maven.jar.plugin.version>3.4.2</maven.jar.plugin.version>
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
<maven.bundle.plugin.version>5.1.9</maven.bundle.plugin.version>
<maven.bundle.plugin.version>6.0.0</maven.bundle.plugin.version>
<maven.animal.sniffer.plugin.version>1.14</maven.animal.sniffer.plugin.version>
<maven.gpg.plugin.version>3.2.4</maven.gpg.plugin.version>
<maven.javadoc.plugin.version>2.9</maven.javadoc.plugin.version>
<maven.javadoc.plugin.version>3.11.2</maven.javadoc.plugin.version>
<bytebuddy.version>1.14.17</bytebuddy.version>

<maven.surefire.plugin.version>2.18.1</maven.surefire.plugin.version>
<maven.surefire.plugin.version>3.5.2</maven.surefire.plugin.version>
<maven.checkstyle.plugin.version>3.4.0</maven.checkstyle.plugin.version>
<maven.spotbugs.plugin.version>4.8.5.0</maven.spotbugs.plugin.version>
<maven.sonar.plugin.version>3.3.0.603</maven.sonar.plugin.version>
<maven.spotbugs.plugin.version>4.8.6.6</maven.spotbugs.plugin.version>
<maven.sonar.plugin.version>5.0.0.4389</maven.sonar.plugin.version>
<maven.jacoco.plugin.version>0.7.9</maven.jacoco.plugin.version>
<maven-release-plugin-version>3.0.1</maven-release-plugin-version>
<mockito.version>5.12.0</mockito.version>
</properties>

<licenses>
Expand Down Expand Up @@ -139,23 +141,17 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration combine.self="override">
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
<useFile>false</useFile>
<runOrder>failedfirst</runOrder>

<!-- 1C means 1 process per cpu core -->
<!-- forkCount>1C</forkCount>
<reuseForks>true</reuseForks>
<threadCount>1</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<parallel>methods</parallel -->

<!-- the argLine variable is needed for JaCoco -->
<trimStackTrace>false</trimStackTrace>
<argLine>
-Xms128m -Xmx2G
-Dhazelcast.phone.home.enabled=false
-Dhazelcast.mancenter.enabled=false
-Dhazelcast.test.use.network=false
-Djava.net.preferIPv4Stack=true
-Dhazelcast.logging.type=log4j2
</argLine>
</configuration>
</plugin>
Expand All @@ -176,7 +172,6 @@
<configLocation>${main.basedir}/checkstyle/checkstyle.xml</configLocation>
<suppressionsLocation>${main.basedir}/checkstyle/suppressions.xml</suppressionsLocation>
<headerLocation>${main.basedir}/checkstyle/ClassHeader.txt</headerLocation>
<enableRSS>false</enableRSS>
<linkXRef>true</linkXRef>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
Expand Down Expand Up @@ -265,10 +260,10 @@
<configuration>
<webAppSourceDirectory>${basedir}/src/test/webapp</webAppSourceDirectory>
<useTestScope>true</useTestScope>
<webAppConfig>
<webApp>
<contextPath>/</contextPath>
<descriptor>${basedir}/src/test/webapp/WEB-INF/web.xml</descriptor>
</webAppConfig>
</webApp>
<stopPort>9966</stopPort>
<stopKey>stop</stopKey>
</configuration>
Expand All @@ -290,6 +285,18 @@
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
Expand All @@ -303,6 +310,7 @@
<version>${servlet.api.version}</version>
<scope>provided</scope>
</dependency>

<!-- Needed to make Tomcat log in tests-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down Expand Up @@ -382,6 +390,19 @@
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
<scope>test</scope>
<exclusions>
<!-- We want to remove CL from classpath and use SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
Expand All @@ -408,11 +429,14 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
<optional>true</optional>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down Expand Up @@ -442,6 +466,24 @@
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.opentest4j</groupId>
<artifactId>opentest4j</artifactId>
<version>${opentest4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
Expand Down Expand Up @@ -475,6 +517,7 @@
-Dhazelcast.version.check.enabled=false
-Dhazelcast.mancenter.enabled=false
-Dhazelcast.test.use.network=false
-Djava.net.preferIPv4Stack=true
</argLine>
</properties>
<build>
Expand All @@ -496,7 +539,7 @@
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${maven.sonar.plugin.version}</version>
</plugin>
Expand Down Expand Up @@ -612,6 +655,7 @@
<hazelcast.version>5.3.7</hazelcast.version>
</properties>
</profile>

<profile>
<id>5.4.z</id>
<properties>
Expand All @@ -620,47 +664,18 @@
</profile>
<profile>
<id>master</id>
<dependencies>
<dependency>
<groupId>org.opentest4j</groupId>
<artifactId>opentest4j</artifactId>
<version>${opentest4j.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<hazelcast.version>5.5.0-SNAPSHOT</hazelcast.version>
<mockito.version>5.12.0</mockito.version>
<opentest4j.version>1.3.0</opentest4j.version>
<hazelcast.version>5.5.0</hazelcast.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration combine.self="override">
<parallel>none</parallel>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine>-Xms128m -Xmx2G
-Dhazelcast.phone.home.enabled=false
-Dhazelcast.mancenter.enabled=false
-Dhazelcast.test.use.network=true
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<!-- SUP-420 case. Tomcat 9.0.z and 5.3.z hazelcast. Using jdk 1.8 because tomcat supports 1.8.
Therefore, we have to exclude jetty tests from compiling/running and jetty classes from classpath
because they require jdk 11. -->
<!-- SUP-420 case. Tomcat 9.0.z and 5.3.z hazelcast. Using jdk 1.8 because tomcat supports 1.8.
Therefore, we have to exclude jetty tests from compiling/running and jetty classes from classpath
because they require jdk 11. -->
<id>tomcat-jdk8</id>
<properties>
<hazelcast.version>5.3.7</hazelcast.version>
Expand Down Expand Up @@ -700,12 +715,6 @@
<configuration combine.self="override">
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>failedfirst</runOrder>
<argLine>
-Xms128m -Xmx2G
-Dhazelcast.phone.home.enabled=false
-Dhazelcast.mancenter.enabled=false
-Dhazelcast.test.use.network=false
</argLine>
<excludes>
<exclude>
com.hazelcast.wm.test.jetty.*
Expand Down
Loading

0 comments on commit 020a7b8

Please sign in to comment.