@@ -104,10 +104,13 @@ func TestMapAndLifecycleEventsAll(t *testing.T) {
104104 runBasicTests (g , namedMap , namedMap .Name (), & expected , - 1 )
105105}
106106
107+ // TestEventDisconnect tests to ensure that if we get a disconnect, then we can
107108func TestEventDisconnect (t * testing.T ) {
108109 t .Setenv ("COHERENCE_SESSION_DEBUG" , "true" )
109110 //g, session := initTest(t)
110- g , session := initTest (t , coherence .WithDisconnectTimeout (time .Duration (130000 )* time .Millisecond ))
111+ g , session := initTest (t ,
112+ coherence .WithDisconnectTimeout (time .Duration (130000 )* time .Millisecond ),
113+ coherence .WithReadyTimeout (time .Duration (70 )* time .Second ))
111114 defer session .Close ()
112115
113116 namedCache := GetNamedCache [string , string ](g , session , "test-reconnect-cache" )
@@ -119,7 +122,7 @@ func TestEventDisconnect(t *testing.T) {
119122}
120123
121124// TestEventDisconnectWithReadyTimeoutDelay tests that the ready timeout is honoured,
122- // as we have stopped the gRPC proxy.
125+ // as we have stopped the gRPC proxy before the test runs .
123126func TestEventDisconnectWithReadyTimeoutDelay (t * testing.T ) {
124127 t .Setenv ("COHERENCE_SESSION_DEBUG" , "true" )
125128
@@ -275,9 +278,6 @@ func RunTestReconnect(g *gomega.WithT, namedMap coherence.NamedMap[string, strin
275278 fmt .Println ("Issue stop of $GRPC:GrpcProxy" )
276279 _ , err = IssuePostRequest ("http://127.0.0.1:30000/management/coherence/cluster/services/$GRPC:GrpcProxy/members/1/stop" )
277280 g .Expect (err ).ShouldNot (gomega .HaveOccurred ())
278-
279- // sleep for 70 seconds to give the shutdown time to take effect
280- Sleep (70 )
281281 }
282282
283283 // add another 'additional' mutations
0 commit comments