From d1a422a228a980e40890d07b3026b51d1f24e179 Mon Sep 17 00:00:00 2001 From: ajatprabha Date: Mon, 4 Dec 2023 20:55:01 +0530 Subject: [PATCH] update specs --- client_publish_test.go | 3 ++- client_resolver_test.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client_publish_test.go b/client_publish_test.go index fcbf349..6066d8b 100644 --- a/client_publish_test.go +++ b/client_publish_test.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "errors" + "fmt" "math" "sync" "testing" @@ -260,7 +261,7 @@ func (s *ClientPublishSuite) TestPublishWithMultiConnectionMode() { tba := testBrokerAddress tba.Port = uint16(1883 + i) - clients[tba.String()] = mc + clients[fmt.Sprintf("%s-%d", tba.String(), ii)] = mc mcks = append(mcks, mc, mt) } diff --git a/client_resolver_test.go b/client_resolver_test.go index 1693211..99eee71 100644 --- a/client_resolver_test.go +++ b/client_resolver_test.go @@ -663,7 +663,7 @@ func TestClient_AddressUpdates(t *testing.T) { go func() { ch <- []TCPAddress{testBrokerAddress, testBrokerAddress2} }() - wantAddrs := []string{testBrokerAddress.String(), testBrokerAddress2.String()} + wantAddrs := []string{testBrokerAddress.String() + "-0", testBrokerAddress2.String() + "-1"} assert.Eventually(t, func() bool { c.clientMu.RLock() defer c.clientMu.RUnlock() @@ -767,7 +767,7 @@ func TestClient_AddressUpdates(t *testing.T) { go func() { ch <- []TCPAddress{testBrokerAddress, testBrokerAddress2} }() - wantAddrs := []string{testBrokerAddress.String(), testBrokerAddress2.String()} + wantAddrs := []string{testBrokerAddress.String() + "-0", testBrokerAddress2.String() + "-1"} assert.Eventually(t, func() bool { c.clientMu.RLock() defer c.clientMu.RUnlock()