Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: move pubsub IT to another suite #2352

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
58 changes: 58 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,64 @@ jobs:
benchmarks/results/**
java/client/build/reports/spotbugs/**

test-pubsub:
needs: load-engine-matrix
timeout-minutes: 35
strategy:
# Run all jobs
fail-fast: false
matrix:
java:
- 17
engine: ${{ fromJson(needs.load-engine-matrix.outputs.matrix) }}
host:
- {
OS: ubuntu,
RUNNER: ubuntu-latest,
TARGET: x86_64-unknown-linux-gnu
}

runs-on: ${{ matrix.host.RUNNER }}

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.java }}

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: ${{ matrix.host.OS }}
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}
engine-version: ${{ matrix.engine.version }}

- name: Install protoc (protobuf)
uses: arduino/setup-protoc@v3
with:
version: "26.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Test pubsub
working-directory: java
run: ./gradlew :integTest:pubsubTest

- name: Upload test & spotbugs reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-pubsub-java-${{ matrix.java }}-${{ matrix.engine.type }}-${{ matrix.engine.version }}-${{ matrix.host.RUNNER }}
path: |
java/integTest/build/reports/**
utils/clusters/**

build-amazonlinux-latest:
if: github.repository_owner == 'valkey-io'
strategy:
Expand Down
6 changes: 6 additions & 0 deletions java/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ To run end-to-end tests, use the following command:
./gradlew :integTest:test
```

To run integration tests for pubsub feature:

```bash
./gradlew :integTest:pubsubTest
```

To run a single test, use the following command:
```bash
./gradlew :integTest:test --tests '*.functionLoad_and_functionList' --rerun
Expand Down
24 changes: 21 additions & 3 deletions java/integTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,21 @@ tasks.register('startStandalone') {
}
}

tasks.register('beforeTests') {}
tasks.register('afterTests') {}

test.dependsOn 'stopAllBeforeTests'
beforeTests.dependsOn 'stopAllBeforeTests'
stopAllBeforeTests.finalizedBy 'clearDirs'
clearDirs.finalizedBy 'startStandalone'
clearDirs.finalizedBy 'startCluster'
test.finalizedBy 'stopAllAfterTests'
test.dependsOn ':client:buildRustRelease'
afterTests.finalizedBy 'stopAllAfterTests'
beforeTests.dependsOn ':client:buildRustRelease'

tasks.withType(Test) {
useJUnitPlatform()
dependsOn 'beforeTests'
finalizedBy 'afterTests'

doFirst {
println "Cluster ports = ${clusterPorts}"
println "Standalone ports = ${standalonePorts}"
Expand All @@ -122,3 +128,15 @@ tasks.withType(Test) {
logger.quiet "${desc.className}.${desc.name}: ${result.resultType} ${(result.getEndTime() - result.getStartTime())/1000}s"
}
}

test {
filter {
excludeTestsMatching 'glide.PubSubTests'
}
}

tasks.register('pubsubTest', Test) {
filter {
includeTestsMatching 'glide.PubSubTests'
}
}
Loading