From cb6e51531b04a176897d7d7358d249105d921b77 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Mon, 28 Aug 2023 13:55:14 +0200 Subject: [PATCH] test: Fix TestBridge_SyncWithOnGoingEvents Checking for the initial status of the original check as this is not required to verify the intended behavior. The original check is also prone to issues related to event processing order. --- internal/bridge/sync_test.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/bridge/sync_test.go b/internal/bridge/sync_test.go index b9e4397a..adca3418 100644 --- a/internal/bridge/sync_test.go +++ b/internal/bridge/sync_test.go @@ -297,12 +297,6 @@ func TestBridge_SyncWithOngoingEvents(t *testing.T) { require.NoError(t, client.Login(info.Addresses[0], string(info.BridgePass))) defer func() { _ = client.Logout() }() - status, err := client.Select(`Folders/folder`, false) - require.NoError(t, err) - // Original folder should have more than 0 messages and less than the total. - require.Greater(t, status.Messages, uint32(0)) - require.Less(t, status.Messages, uint32(numMsg)) - // Check that the new messages arrive in the right location. require.Eventually(t, func() bool { status, err := client.Select(`Folders/folder2`, true)