From aaf9254f853bdb47d559fb519fceb64c537cf008 Mon Sep 17 00:00:00 2001 From: joanestebanr <129153821+joanestebanr@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:46:22 +0100 Subject: [PATCH] fix: unittest --- aggsender/aggsender_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/aggsender/aggsender_test.go b/aggsender/aggsender_test.go index 5e01aa45b..1ea46f5ce 100644 --- a/aggsender/aggsender_test.go +++ b/aggsender/aggsender_test.go @@ -859,13 +859,8 @@ func TestCheckIfCertificatesAreSettled(t *testing.T) { }, } - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - go aggSender.checkIfCertificatesAreSettled(ctx) - - time.Sleep(2 * time.Second) - cancel() + ctx := context.TODO() + aggSender.checkPendingCertificatesStatus(ctx) mockAggLayerClient.AssertExpectations(t) mockStorage.AssertExpectations(t)