From cecc1dd32544dd985bd9dcf95c99035739a9113c Mon Sep 17 00:00:00 2001 From: Anton Berezhnyi Date: Wed, 15 Nov 2023 00:04:43 +0200 Subject: [PATCH] Put mocked scope before 10 second --- DelayedDeleteMessageHandler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DelayedDeleteMessageHandler.go b/DelayedDeleteMessageHandler.go index 74296a9..dc0728a 100644 --- a/DelayedDeleteMessageHandler.go +++ b/DelayedDeleteMessageHandler.go @@ -30,11 +30,11 @@ func (h *DelayedDeleteMessageHandler) AddMessage(chatId int, messageId int, time }) go func() { - time.Sleep(timeout) + time.Sleep(timeout - time.Second*10) deleteMessageMock := mocha.Post(expect.URLPath("/deleteMessage")). Body(expectChatId(chatId), expectMessageId(messageId)). - Reply(getDeleteMessageSuccessResponse()) + Reply(getDeleteMessageSuccessResponse()).Repeat(1) expectDeleteMessageScope := mocks.TelegramMockServer.mocha.AddMocks(deleteMessageMock)