From 1fe8d7308fa18ba3edab2aa81b5456d742c0adb6 Mon Sep 17 00:00:00 2001 From: Ali Najafizadeh <a.najafizadeh@gmail.com> Date: Sat, 18 May 2024 13:39:47 -0400 Subject: [PATCH] Fix confirm test --- bus_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus_test.go b/bus_test.go index 83864a5..3dad8c9 100644 --- a/bus_test.go +++ b/bus_test.go @@ -51,6 +51,7 @@ func TestConfirmConsumer(t *testing.T) { // as it could happen that the event can be sent before the consumer starts for msg, err := range c.Get(ctx, bus.WithFromOldest(), bus.WithSubject("a.b.c"), bus.WithManualAck()) { + atomic.AddInt64(&hit, 1) assert.NoError(t, err) assert.NotNil(t, msg) @@ -61,7 +62,6 @@ func TestConfirmConsumer(t *testing.T) { assert.Equal(t, "a.b.c", evt.Subject) assert.Equal(t, `"hello"`, string(evt.Data)) - atomic.AddInt64(&hit, 1) err = msg.Ack(ctx) assert.NoError(t, err)