Skip to content

Add streaming tests #121

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

Merged
merged 1 commit into from
May 1, 2025
Merged
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
6 changes: 2 additions & 4 deletions .github/workflows/examples-jakarta-v1.2.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 24.09.3
- 25.03
- 25.03.1-SNAPSHOT
- 25.03.1
- 25.03.2-SNAPSHOT
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/examples-jakarta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 24.09.3
- 25.03
- 25.03.1-SNAPSHOT
- 25.03.1
- 25.03.2-SNAPSHOT
go-version:
- 1.23.x
- 1.24.x
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/examples-v1.2.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.12-SNAPSHOT
- 22.06.11
- 22.06.13-SNAPSHOT
- 22.06.12
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.12-SNAPSHOT
- 22.06.11
- 14.1.2-0-1
- 14.1.2-0-2-SNAPSHOT
- 22.06.13-SNAPSHOT
- 22.06.12
- 14.1.2-0-2
- 14.1.2-0-3-SNAPSHOT
go-version:
- 1.23.x
- 1.24.x
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/resolver-clusters-compatability-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.11
- 24.09.3
- 25.03
- 14.1.2-0-1
- 22.06.12
- 25.03.1
- 14.1.2-0-2
go-version:
- 1.23.x
- 1.24.x
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/resolver-compatability-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.11
- 24.09.3
- 25.03
- 14.1.2-0-1
- 22.06.12
- 25.03.1
- 14.1.2-0-2
go-version:
- 1.23.x
- 1.24.x
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/streaming-jakarta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright 2025 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.

# ---------------------------------------------------------------------------
# Coherence Go Client GitHub Actions test streaming against v23.03+
# ---------------------------------------------------------------------------
name: CI-Examples Jakarta

on:
workflow_dispatch:
push:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 25.03.1
- 25.03.2-SNAPSHOT
go-version:
- 1.23.x
- 1.24.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get Docker Images
shell: bash
run: |
docker pull gcr.io/distroless/java17-debian12
uname -a

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'

- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mods-

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'

- name: Verify Examples
shell: bash
run: |
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=${{ matrix.coherenceVersion }} PROFILES=,jakarta,-javax make clean generate-proto generate-proto-v1 build-test-images test-cluster-startup test-e2e-streaming
make test-cluster-shutdown || true

- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.go-version }}-${{ matrix.coherenceVersion }}
path: build/_output/test-logs
80 changes: 80 additions & 0 deletions .github/workflows/streaming.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright 2025 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.

# ---------------------------------------------------------------------------
# Coherence Go Client GitHub Actions test streaming against v22.06 versions
# ---------------------------------------------------------------------------
name: CI-Streaming v22.06

on:
workflow_dispatch:
push:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.13-SNAPSHOT
- 22.06.12
- 14.1.2-0-2
- 14.1.2-0-3-SNAPSHOT
go-version:
- 1.23.x
- 1.24.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get Docker Images
shell: bash
run: |
docker pull gcr.io/distroless/java17-debian12

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'

- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mods-

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'

- name: Verify Examples
shell: bash
run: |
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=${{ matrix.coherenceVersion }} PROFILES=,-jakarta,javax make clean generate-proto generate-proto-v1 build-test-images test-cluster-startup test-e2e-streaming
make test-cluster-shutdown || true

- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.go-version }}-${{ matrix.coherenceVersion }}
path: build/_output/test-logs
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ test-e2e-standalone: test-clean test gotestsum $(BUILD_PROPS) ## Run e2e tests w
-- $(GO_TEST_FLAGS) -v -coverprofile=$(COVERAGE_DIR)/cover-functional.out -v ./test/e2e/standalone/... -coverpkg=github.com/oracle/coherence-go-client/v2/coherence/...
go tool cover -func=$(COVERAGE_DIR)/cover-functional.out | grep -v '0.0%'

# ----------------------------------------------------------------------------------------------------------------------
# Executes the Go streaming tests for standalone Coherence
# ----------------------------------------------------------------------------------------------------------------------
.PHONY: test-e2e-streaming
test-e2e-streaming: test-clean test gotestsum $(BUILD_PROPS) ## Run e2e tests with Coherence
CGO_ENABLED=0 $(GOTESTSUM) --format testname --junitfile $(TEST_LOGS_DIR)/go-streaming-test.xml \
-- $(GO_TEST_FLAGS) -v -coverprofile=$(COVERAGE_DIR)/cover-functional.out -v ./test/e2e/streaming/... -coverpkg=github.com/oracle/coherence-go-client/v2/coherence/...

# ----------------------------------------------------------------------------------------------------------------------
# Executes the Go end to end tests for standalone Coherence with Scope set
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions scripts/run-compat-ce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ set -e
echo "Coherence CE 22.06.10"
COHERENCE_VERSION=22.06.10 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-standalone

echo "Coherence CE 14.1.2-0-0"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=14.1.2-0-0 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-standalone
echo "Coherence CE 14.1.2-0-2"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=14.1.2-0-2 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-standalone

echo "Coherence CE 14.1.2-0-2 Streaming"
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=14.1.2-0-2 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-streaming

echo "Coherence CE 22.06.10 with scope"
COHERENCE_VERSION=22.06.10 PROFILES=,-jakarta,javax,scope make clean generate-proto build-test-images test-e2e-standalone-scope
Expand Down
Loading
Loading