From 9a16c4311edd434d0d7584b43328817fe575c115 Mon Sep 17 00:00:00 2001 From: Maksim Terekhin Date: Fri, 8 Nov 2024 17:54:17 +0100 Subject: [PATCH] chore: Test for the SQS subscriber --- pkg/pubsub/sqs/subscriber_test.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/pubsub/sqs/subscriber_test.go b/pkg/pubsub/sqs/subscriber_test.go index 990977cf..90a1abe7 100644 --- a/pkg/pubsub/sqs/subscriber_test.go +++ b/pkg/pubsub/sqs/subscriber_test.go @@ -30,7 +30,6 @@ func (m *mockSQSClient) ReceiveMessage( func Test_Subscriber_Subscribe(t *testing.T) { t.Run("all subscribers finished", func(t *testing.T) { var nHandlers int64 // atomic - var executedTimes int64 c := make(chan int, 6) @@ -64,7 +63,6 @@ func Test_Subscriber_Subscribe(t *testing.T) { atomic.AddInt64(&nHandlers, 1) defer atomic.AddInt64(&nHandlers, -1) - atomic.AddInt64(&executedTimes, 1) time.Sleep(time.Millisecond * 10) }, @@ -84,9 +82,5 @@ func Test_Subscriber_Subscribe(t *testing.T) { if got := atomic.LoadInt64(&nHandlers); got != 0 { t.Errorf("expected 0, got %d", got) } - - if got := atomic.LoadInt64(&executedTimes); got != 6 { - t.Errorf("expected 6, got %d", got) - } }) }