Skip to content

Commit 5a70c14

Browse files
author
Tim Middleton
committed
Test and repository updates
1 parent 7acb67a commit 5a70c14

File tree

4 files changed

+71
-29
lines changed

4 files changed

+71
-29
lines changed

java/pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
<repository>
293293
<id>ossrh-staging</id>
294294
<name>OSS Sonatype Staging</name>
295-
<url>https://oss.sonatype.org/content/groups/staging/</url>
295+
<url>https://central.sonatype.com</url>
296296
<snapshots>
297297
<enabled>false</enabled>
298298
</snapshots>
@@ -303,6 +303,17 @@
303303

304304
<repository>
305305
<id>snapshots-repo</id>
306+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
307+
<releases>
308+
<enabled>false</enabled>
309+
</releases>
310+
<snapshots>
311+
<enabled>true</enabled>
312+
</snapshots>
313+
</repository>
314+
315+
<repository>
316+
<id>snapshots-repo-old</id>
306317
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
307318
<releases>
308319
<enabled>false</enabled>

scripts/run-compat-ce.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
#
4-
# Copyright (c) 2022, 2024 Oracle and/or its affiliates.
4+
# Copyright (c) 2022, 2025 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at
66
# https://oss.oracle.com/licenses/upl.
77
#
@@ -12,40 +12,40 @@ set -e
1212
# Set the following to include long running streaming tests
1313
# INCLUDE_LONG_RUNNING=true
1414

15-
echo "Coherence CE 22.06.12"
16-
COHERENCE_VERSION=22.06.12 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-standalone
15+
echo "Coherence CE 22.06.13"
16+
COHERENCE_VERSION=22.06.13 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-standalone
1717

18-
echo "Coherence CE 14.1.2-0-2"
19-
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
18+
echo "Coherence CE 14.1.2-0-3"
19+
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=14.1.2-0-3 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-standalone
2020

21-
echo "Coherence CE 14.1.2-0-2 Streaming"
22-
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
21+
echo "Coherence CE 14.1.2-0-3 Streaming"
22+
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17-debian12 COHERENCE_VERSION=14.1.2-0-3 PROFILES=,-jakarta,javax make clean generate-proto build-test-images test-e2e-streaming
2323

24-
echo "Coherence CE 22.06.12 with scope"
25-
COHERENCE_VERSION=22.06.12 PROFILES=,-jakarta,javax,scope make clean generate-proto build-test-images test-e2e-standalone-scope
24+
echo "Coherence CE 22.06.13 with scope"
25+
COHERENCE_VERSION=22.06.13 PROFILES=,-jakarta,javax,scope make clean generate-proto build-test-images test-e2e-standalone-scope
2626

27-
echo "Coherence CE 22.06.12 with SSL using env"
27+
echo "Coherence CE 22.06.13 with SSL using env"
2828
SECURE=env COHERENCE_IGNORE_INVALID_CERTS=true \
2929
COHERENCE_TLS_CERTS_PATH=`pwd`/test/utils/certs/guardians-ca.crt \
3030
COHERENCE_TLS_CLIENT_CERT=`pwd`/test/utils/certs/star-lord.crt \
3131
COHERENCE_TLS_CLIENT_KEY=`pwd`/test/utils/certs/star-lord.key \
32-
COHERENCE_VERSION=22.06.7 PROFILES=,secure make clean certs generate-proto build-test-images test-e2e-standalone
32+
COHERENCE_VERSION=22.06.3 PROFILES=,secure make clean certs generate-proto build-test-images test-e2e-standalone
3333

34-
echo "Coherence CE 22.06.12 with SSL using options"
34+
echo "Coherence CE 22.06.13 with SSL using options"
3535
# suite_test.go takes the below env vars and then populates the session options
3636
SECURE=options COHERENCE_IGNORE_INVALID_CERTS_OPTION=true \
3737
COHERENCE_TLS_CERTS_PATH_OPTION=`pwd`/test/utils/certs/guardians-ca.crt \
3838
COHERENCE_TLS_CLIENT_CERT_OPTION=`pwd`/test/utils/certs/star-lord.crt \
3939
COHERENCE_TLS_CLIENT_KEY_OPTION=`pwd`/test/utils/certs/star-lord.key \
40-
COHERENCE_VERSION=22.06.7 PROFILES=,secure make clean certs generate-proto build-test-images test-e2e-standalone
40+
COHERENCE_VERSION=22.06.13 PROFILES=,secure make clean certs generate-proto build-test-images test-e2e-standalone
4141

42-
echo "Coherence CE 22.06.12 with SSL using tlsConfig"
42+
echo "Coherence CE 22.06.13 with SSL using tlsConfig"
4343
# suite_test.go takes the below env vars and then creates a tls.Config and passes to the WithTLSConfig
4444
SECURE=tlsConfig COHERENCE_IGNORE_INVALID_CERTS_OPTION=true \
4545
COHERENCE_TLS_CERTS_PATH_OPTION=`pwd`/test/utils/certs/guardians-ca.crt \
4646
COHERENCE_TLS_CLIENT_CERT_OPTION=`pwd`/test/utils/certs/star-lord.crt \
4747
COHERENCE_TLS_CLIENT_KEY_OPTION=`pwd`/test/utils/certs/star-lord.key \
48-
COHERENCE_VERSION=22.06.7 PROFILES=,secure make clean certs generate-proto build-test-images test-e2e-standalone
48+
COHERENCE_VERSION=22.06.13 PROFILES=,secure make clean certs generate-proto build-test-images test-e2e-standalone
4949

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

test/e2e/topics/publisher_event_test.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ func NewCountingPublisherListener[V any](name string) *CountingPublisherListener
8888
atomic.AddInt32(&countingListener.destroyCount, 1)
8989
}).OnReleased(func(_ coherence.PublisherLifecycleEvent[V]) {
9090
atomic.AddInt32(&countingListener.releaseCount, 1)
91+
}).OnConnected(func(_ coherence.PublisherLifecycleEvent[V]) {
92+
atomic.AddInt32(&countingListener.connectedCount, 1)
93+
}).OnDisconnected(func(_ coherence.PublisherLifecycleEvent[V]) {
94+
atomic.AddInt32(&countingListener.disconnectedCount, 1)
95+
}).OnChannelsFreed(func(_ coherence.PublisherLifecycleEvent[V]) {
96+
atomic.AddInt32(&countingListener.freedCount, 1)
9197
}).OnAny(func(_ coherence.PublisherLifecycleEvent[V]) {
9298
atomic.AddInt32(&countingListener.allCount, 1)
9399
})
@@ -96,9 +102,12 @@ func NewCountingPublisherListener[V any](name string) *CountingPublisherListener
96102
}
97103

98104
type CountingPublisherListener[V any] struct {
99-
listener coherence.PublisherLifecycleListener[V]
100-
name string
101-
releaseCount int32
102-
destroyCount int32
103-
allCount int32
105+
listener coherence.PublisherLifecycleListener[V]
106+
name string
107+
releaseCount int32
108+
destroyCount int32
109+
connectedCount int32
110+
disconnectedCount int32
111+
freedCount int32
112+
allCount int32
104113
}

test/e2e/topics/subscriber_event_test.go

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"context"
1111
"github.com/onsi/gomega"
1212
"github.com/oracle/coherence-go-client/v2/coherence"
13+
"github.com/oracle/coherence-go-client/v2/coherence/subscriber"
1314
"github.com/oracle/coherence-go-client/v2/test/utils"
1415
"sync/atomic"
1516
"testing"
@@ -22,14 +23,17 @@ func TestSubscriberEventsDestroyOnServer(t *testing.T) {
2223
err error
2324
)
2425

25-
const topicName = "subscriber-events"
26+
const (
27+
topicName = "subscriber-events"
28+
subscriberGroupName = "subscriber-events"
29+
)
2630

2731
t.Setenv("COHERENCE_LOG_LEVEL", "ALL")
2832

2933
session1, topic1 := getSessionAndTopic[string](g, topicName)
3034
defer session1.Close()
3135

32-
sub, err := topic1.CreateSubscriber(context.Background())
36+
sub, err := topic1.CreateSubscriber(context.Background(), subscriber.InSubscriberGroup(subscriberGroupName))
3337
g.Expect(err).Should(gomega.Not(gomega.HaveOccurred()))
3438

3539
utils.Sleep(5)
@@ -43,7 +47,7 @@ func TestSubscriberEventsDestroyOnServer(t *testing.T) {
4347

4448
utils.Sleep(5)
4549

46-
g.Eventually(func() int32 { return listener.destroyCount }).
50+
g.Eventually(func() int32 { return listener.subscriberGrpCount }).
4751
WithTimeout(10 * time.Second).Should(gomega.Equal(int32(1)))
4852

4953
//g.Expect(topic1.Close(context.Background())).Should(gomega.Equal(coherence.ErrTopicDestroyedOrReleased))
@@ -88,6 +92,18 @@ func NewCountingSubscriberListener[V any](name string) *CountingSubscriberListen
8892
atomic.AddInt32(&countingListener.destroyCount, 1)
8993
}).OnReleased(func(_ coherence.SubscriberLifecycleEvent[V]) {
9094
atomic.AddInt32(&countingListener.releaseCount, 1)
95+
}).OnDisconnected(func(_ coherence.SubscriberLifecycleEvent[V]) {
96+
atomic.AddInt32(&countingListener.disconnectedCount, 1)
97+
}).OnUnsubscribed(func(_ coherence.SubscriberLifecycleEvent[V]) {
98+
atomic.AddInt32(&countingListener.unsubscribedCount, 1)
99+
}).OnChannelPopulated(func(_ coherence.SubscriberLifecycleEvent[V]) {
100+
atomic.AddInt32(&countingListener.populatedCount, 1)
101+
}).OnChannelAllocated(func(_ coherence.SubscriberLifecycleEvent[V]) {
102+
atomic.AddInt32(&countingListener.allocatedCount, 1)
103+
}).OnChannelHeadChanged(func(_ coherence.SubscriberLifecycleEvent[V]) {
104+
atomic.AddInt32(&countingListener.headChangedCount, 1)
105+
}).OnSubscriberGroupDestroyed(func(_ coherence.SubscriberLifecycleEvent[V]) {
106+
atomic.AddInt32(&countingListener.subscriberGrpCount, 1)
91107
}).OnAny(func(_ coherence.SubscriberLifecycleEvent[V]) {
92108
atomic.AddInt32(&countingListener.allCount, 1)
93109
})
@@ -96,9 +112,15 @@ func NewCountingSubscriberListener[V any](name string) *CountingSubscriberListen
96112
}
97113

98114
type CountingSubscriberListener[V any] struct {
99-
listener coherence.SubscriberLifecycleListener[V]
100-
name string
101-
releaseCount int32
102-
destroyCount int32
103-
allCount int32
115+
listener coherence.SubscriberLifecycleListener[V]
116+
name string
117+
releaseCount int32
118+
disconnectedCount int32
119+
unsubscribedCount int32
120+
populatedCount int32
121+
allocatedCount int32
122+
headChangedCount int32
123+
subscriberGrpCount int32
124+
destroyCount int32
125+
allCount int32
104126
}

0 commit comments

Comments
 (0)