From 39f351b28e0a3ff09954f78ebabcbd9bb2003758 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Mon, 4 Mar 2024 23:20:38 +0700 Subject: [PATCH] use GetSubscriptions in tests --- subscriptions_transport_ws_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscriptions_transport_ws_test.go b/subscriptions_transport_ws_test.go index e2bb921..e1723de 100644 --- a/subscriptions_transport_ws_test.go +++ b/subscriptions_transport_ws_test.go @@ -204,7 +204,7 @@ func TestSubscription_closeThenRun(t *testing.T) { bulkSubscribe() go func() { - length := subscriptionClient.getContext().GetSubscriptionsLength(nil) + length := len(subscriptionClient.GetSubscriptions()) if length != 2 { t.Errorf("unexpected subscription client. got: %d, want: 2", length) return @@ -220,7 +220,7 @@ func TestSubscription_closeThenRun(t *testing.T) { }() time.Sleep(3 * time.Second) - length := subscriptionClient.getContext().GetSubscriptionsLength(nil) + length := len(subscriptionClient.GetSubscriptions()) if length != 2 { t.Fatalf("unexpected subscription client after restart. got: %d, want: 2, subscriptions: %+v", length, subscriptionClient.context.subscriptions) }