Skip to content
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
2 changes: 1 addition & 1 deletion coherence/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ func validateFilePath(file string) error {
// String returns a string representation of SessionOptions.
func (s *SessionOptions) String() string {
var sb = strings.Builder{}
sb.WriteString(fmt.Sprintf("SessionOptions{address=%v, plainText=%v, scope=%v, format=%v, request timeout=%v, disconnect timeout=%v, ready timeout=%v",
sb.WriteString(fmt.Sprintf("SessionOptions{address=%v, plainText=%v, scope=%v, format=%v, requestTimeout=%v, disconnectTimeout=%v, readyTimeout=%v",
s.Address, s.PlainText, s.Scope, s.Format, s.RequestTimeout, s.DisconnectTimeout, s.ReadyTimeout))

if !s.PlainText {
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<jvmFlag>-Dcoherence.security.key=${coherence.security.key}</jvmFlag>
<jvmFlag>-Dcoherence.security.cert=${coherence.security.cert}</jvmFlag>
<jvmFlag>-Dcoherence.security.ca.cert=${coherence.security.ca.cert}</jvmFlag>
<jvmFlag>-Dcoherence.io.json.debug=true</jvmFlag>
<!-- uncomment for JSSON debug, <jvmFlag>-Dcoherence.io.json.debug=true</jvmFlag>-->
<jvmFlag>-Dcoherence.log.level=9</jvmFlag>
<jvmFlag>-Dcoherence.distributed.localstorage=true</jvmFlag>
<jvmFlag>-Dcoherence.management.refresh.expiry=1s</jvmFlag>
Expand Down
17 changes: 13 additions & 4 deletions test/e2e/standalone/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ func TestEventDisconnect(t *testing.T) {
t.Setenv("COHERENCE_SESSION_DEBUG", "true")
//g, session := initTest(t)
g, session := initTest(t,
coherence.WithDisconnectTimeout(time.Duration(130000)*time.Millisecond),
coherence.WithReadyTimeout(time.Duration(70)*time.Second))
coherence.WithDisconnectTimeout(time.Duration(130)*time.Second),
coherence.WithReadyTimeout(time.Duration(130)*time.Second))
defer session.Close()

namedCache := GetNamedCache[string, string](g, session, "test-reconnect-cache")
Expand All @@ -132,7 +132,7 @@ func TestEventDisconnectWithReadyTimeoutDelay(t *testing.T) {
t.Error("Unable to issue post request to stop gRPC proxy")
}

g, session := initTest(t, coherence.WithReadyTimeout(time.Duration(130000)*time.Millisecond))
g, session := initTest(t, coherence.WithReadyTimeout(time.Duration(130)*time.Second))
defer session.Close()

namedCache := GetNamedCache[string, string](g, session, "test-reconnect-cache")
Expand Down Expand Up @@ -275,11 +275,19 @@ func RunTestReconnect(g *gomega.WithT, namedMap coherence.NamedMap[string, strin
// issue a stop, which better simulates a sudden disconnect
// vs shutdown (which is graceful), for the "$GRPC:GrpcProxy" on node 1.
// the client should eventually connect
fmt.Println("Issue stop of $GRPC:GrpcProxy")
log.Println("Issue stop of $GRPC:GrpcProxy")
_, err = IssuePostRequest("http://127.0.0.1:30000/management/coherence/cluster/services/$GRPC:GrpcProxy/members/1/stop")
g.Expect(err).ShouldNot(gomega.HaveOccurred())
}

// get the size to force reconnect
log.Println("Issue Size() to force reconnect")
_, err = namedMap.Size(ctx)
g.Expect(err).ShouldNot(gomega.HaveOccurred())

log.Println("Sleeping to test re-connect")
Sleep(5)

// add another 'additional' mutations
createMutations(g, namedMap, additional)

Expand All @@ -295,6 +303,7 @@ func RunTestReconnect(g *gomega.WithT, namedMap coherence.NamedMap[string, strin
// createMutations creates a specified number of data mutations.
func createMutations(g *gomega.WithT, namedMap coherence.NamedMap[string, string], iters int) {
var err error
log.Println("createMutations, iters=", iters)
for i := 0; i < iters; i++ {
key := fmt.Sprintf("key-%d", i)
value := fmt.Sprintf("value-%d", i)
Expand Down