X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/48d7bce28b18ecef4c52c98821675605464cecb9..b1be0ee8530df5db8973bfe355f2f6d3149383a0:/whatsapp_inbox_test.go diff --git a/whatsapp_inbox_test.go b/whatsapp_inbox_test.go index a0a0f9d..1ce9a72 100644 --- a/whatsapp_inbox_test.go +++ b/whatsapp_inbox_test.go @@ -147,7 +147,7 @@ func TestWhatsAppRunClosesABatchAfterQuietTime(t *testing.T) { synctest.Wait() require.True(t, test.fake.Emit(whatsappTestMessage(whatsappTestAna, whatsappTestOwn, "m1", "On my way.", time.Now()))) synctest.Wait() - time.Sleep(whatsappBatchQuiet - time.Nanosecond) + time.Sleep(whatsappBatchIdleTimeout - time.Nanosecond) synctest.Wait() require.Zero(t, test.loop.memory.Len()) @@ -268,7 +268,7 @@ func TestWhatsAppCatchupEndsAfterItsLimit(t *testing.T) { require.NoError(t, test.whatsapp.inbox.deliver(t.Context(), test.loop, test.whatsapp.link(), false)) require.Zero(t, test.loop.memory.Len()) - time.Sleep(whatsappCatchupLimit) + time.Sleep(whatsappCatchupTimeout) synctest.Wait() require.NoError(t, test.whatsapp.inbox.deliver(t.Context(), test.loop, test.whatsapp.link(), false)) require.Equal(t, 1, test.loop.memory.Len())