Skip to content

Commit

Permalink
PA-597 Java standalone client changes (#142)
Browse files Browse the repository at this point in the history
This PR includes: 
1. the vector module was added to run related tests with enterprise
server
2. I added skipping redundant run of OS tests against enterprise sever
since we run them agains OS server and they should work agains
enterprise server by default

---------

Co-authored-by: ihsan demir <[email protected]>
  • Loading branch information
sergvatu and ihsandemir authored Dec 20, 2024
1 parent 6be82c9 commit e6a528b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 12 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/java_client_compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ jobs:
strategy:
fail-fast: false
matrix:
server-version: ${{ fromJson(needs.setup_server_matrix.outputs.matrix) }}
kind: [ os, enterprise ]
name: Test Java client ${{ github.event.inputs.branch_name }} branch against ${{ matrix.kind }} ${{ matrix.server-version }} server
server_version: ${{ fromJson(needs.setup_server_matrix.outputs.matrix) }}
server_kind: [ os, enterprise ]
tests_type: [ os, enterprise ]
exclude:
- server_kind: os
tests_type: enterprise
name: Test Java client ${{ github.event.inputs.branch_name }} branch running ${{ matrix.tests_type }} tests against ${{ matrix.server_kind }} ${{ matrix.server_version }} server
steps:
- name: Checkout to scripts
uses: actions/checkout@v4
Expand Down Expand Up @@ -73,25 +77,41 @@ jobs:
uses: madhead/semver-utils@latest
id: version
with:
version: ${{ matrix.server-version }}
version: ${{ matrix.server_version }}
compare-to: 5.3.0

- name: Set up HZ_LICENSEKEY env
if: ${{ matrix.kind == 'enterprise' }}
if: ${{ matrix.server_kind == 'enterprise' }}
run: |
echo "HZ_LICENSEKEY=${{ '>' == steps.version.outputs.comparison-result && secrets.HAZELCAST_ENTERPRISE_KEY || secrets.HAZELCAST_ENTERPRISE_KEY_V5 }}" >> $GITHUB_ENV
- name: Build modules
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e clean install -DskipTests
working-directory: client

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

- 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 }}
working-directory: client/hazelcast-enterprise-java-client-vector

- name: Run enterprise tests
if: ${{ matrix.kind == 'enterprise' }}
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 }}
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ matrix.server_version }}
working-directory: client/hazelcast-enterprise-java-client
28 changes: 24 additions & 4 deletions .github/workflows/server_compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,11 @@ jobs:
matrix:
client_tag: ${{ fromJson(needs.setup_java_client_matrix.outputs.matrix) }}
server_kind: [ os, enterprise ]

name: Test Java Thin client ${{ matrix.client_tag }} with ${{ matrix.server_kind }} server
tests_type: [ os, enterprise ]
exclude:
- server_kind: os
tests_type: enterprise
name: Test Java client (standalone) ${{ matrix.client_tag }} branch running ${{ matrix.tests_type }} tests against ${{ matrix.server_kind }} server
steps:
- name: Set up enterprise license key
if: ${{ github.event.inputs.hz_version < '5.5' }}
Expand Down Expand Up @@ -909,14 +912,31 @@ jobs:
run: |
echo "HZ_LICENSEKEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- name: Build modules
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e clean install -DskipTests
working-directory: client

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

- 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=${{ needs.upload_jars.outputs.hz_server_version }}
working-directory: client/hazelcast-enterprise-java-client-vector

- name: Run enterprise tests
if: ${{ matrix.server_kind == 'enterprise' }}
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
shell: bash -l {0}
run: |
chmod +x mvnw
Expand Down

0 comments on commit e6a528b

Please sign in to comment.