Skip to content

Commit

Permalink
PA-613 Change Compatibility tests workflow to run with java 8 standal…
Browse files Browse the repository at this point in the history
…one client (#144)
  • Loading branch information
sergvatu authored Jan 28, 2025
1 parent 516b797 commit f5ab837
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions .github/workflows/java_client_compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,21 @@ jobs:
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV

- name: Setup Java
- name: Setup Server Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}

- name: Set Server JDK home
run: echo "SERVER_JAVA=$JAVA_HOME" >> $GITHUB_ENV

- name: Setup JDK8
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "8"

- name: Checkout to ${{ github.event.inputs.branch_name }}
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -89,29 +98,56 @@ jobs:
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e clean install -DskipTests
JAVA_HOME=${{env.JAVA_HOME}} ./mvnw -B -V -e clean install -DskipTests -Dtest.hazelcast-server.version=${{ matrix.server_version }}
working-directory: client

- name: Run remote controller for non-enterprise tests
if: ${{ matrix.tests_type == 'os' }}
working-directory: client/hazelcast-java-client/target/test-artifacts
run: |
${{env.SERVER_JAVA}}/bin/java -cp additional-libs/*:hazelcast-remote-controller.jar:hazelcast.jar:test-artifacts.jar:../test-classes/jars/testsubjects.jar:../test-classes/jars/test.jar: -Djava.security.krb5.conf=/home/runner/work/hazelcast-java-client/hazelcast-java-client/hazelcast-java-client/src/test/resources/krb5.conf -Dhazelcast.phone.home.enabled=false -Dhazelcast.logging.details.enabled=true --add-opens=java.base/java.lang=ALL-UNNAMED com.hazelcast.remotecontroller.Main --use-simple-server 2> server_log.txt &
- name: Run non-enterprise tests
if: ${{ matrix.tests_type == 'os' }}
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }}
JAVA_HOME=${{env.JAVA_HOME}} ./mvnw -B -V -e test -Pintegration-tests -Dtest.hazelcast-server.version=${{ matrix.server_version }}
working-directory: client/hazelcast-java-client

- name: Copy vector libs
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
run: |
cp client/hazelcast-enterprise-java-client-vector/target/test-artifacts/os-test-vector-artifacts.jar client/hazelcast-enterprise-java-client/target/test-artifacts/os-test-vector-artifacts.jar
cp client/hazelcast-enterprise-java-client-vector/target/test-artifacts/test-vector-artifacts.jar client/hazelcast-enterprise-java-client/target/test-artifacts/test-vector-artifacts.jar
- name: Run remote controller for enterprise tests
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
working-directory: client/hazelcast-enterprise-java-client/target/test-artifacts
run: |
${{env.SERVER_JAVA}}/bin/java -cp additional-libs/*:hazelcast-remote-controller.jar:../test-artifacts:hazelcast-enterprise.jar:hazelcast.jar:test-artifacts.jar:os-test-artifacts.jar:test-vector-artifacts.jar:test-os-vector-artifacts.jar:../test-classes/jars/testsubjects.jar:../test-classes/jars/test.jar: -Djava.security.krb5.conf=/home/runner/work/hazelcast-java-client/hazelcast-java-client/hazelcast-enterprise-java-client/src/test/resources/krb5.conf -Dhazelcast.logging.details.enabled=true -Dhazelcast.hidensity.check.freememory=false --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-exports jdk.management/com.ibm.lang.management.internal=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED com.hazelcast.remotecontroller.Main --use-simple-server 2> server_log.txt &
- name: Run enterprise Vector tests
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }}
JAVA_HOME=${{env.JAVA_HOME}} ./mvnw -B -V -e test -Pintegration-tests -Dtest.hazelcast-server.version=${{ matrix.server_version }}
working-directory: client/hazelcast-enterprise-java-client-vector

- name: Run enterprise tests
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }}
JAVA_HOME=${{env.JAVA_HOME}} ./mvnw -B -V -e test -Pintegration-tests -Dtest.hazelcast-server.version=${{ matrix.server_version }}
working-directory: client/hazelcast-enterprise-java-client

- name: Archive server logs
uses: actions/upload-artifact@v4
if: always()
with:
name: server-${{ matrix.server_version }}-${{ matrix.server_kind }}-logs-${{ matrix.tests_type }}-tests
path: |
client/hazelcast-java-client/target/test-artifacts/server_log.txt
client/hazelcast-enterprise-java-client/target/test-artifacts/server_log.txt

0 comments on commit f5ab837

Please sign in to comment.