use set/get for reconnectingTimeout

This commit is contained in:
Maycon Santos
2025-07-20 22:16:35 +02:00
parent d7d57a4ec4
commit cc1c77f6dc
2 changed files with 17 additions and 3 deletions
+2 -2
View File
@@ -301,7 +301,7 @@ func TestForeginAutoClose(t *testing.T) {
func TestAutoReconnect(t *testing.T) {
ctx := context.Background()
reconnectingTimeout = 2 * time.Second
setReconnectingTimeout(2 * time.Second)
srvCfg := server.ListenerConfig{
Address: "localhost:1234",
@@ -362,7 +362,7 @@ func TestAutoReconnect(t *testing.T) {
}
log.Infof("waiting for reconnection")
time.Sleep(reconnectingTimeout + 1*time.Second)
time.Sleep(getReconnectingTimeout() + 1*time.Second)
log.Infof("reopent the connection")
_, err = clientAlice.OpenConn(ctx, ra, "bob")