Skip to content

Commit

Permalink
test: Add flushes to avoid timing issue in TestMessagCreatedNoopUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
LBeernaertProton committed Feb 22, 2023
1 parent 70c8da0 commit 703b2df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ func TestMessageCreatedNoopUpdate(t *testing.T) {
// Create two messages externally.
s.messageCreatedFromFile("user", other, "testdata/multipart-mixed.eml")
s.messageCreatedFromFile("user", other, "testdata/afternoon-meeting.eml")
s.flush("user")

// Do noop to receive the updates.
c.C(`A002 NOOP`).Se(`* 2 EXISTS`, `* 2 RECENT`).OK(`A002`)

// Create two more messages externally.
s.messageCreatedFromFile("user", other, "testdata/multipart-mixed.eml")
s.messageCreatedFromFile("user", other, "testdata/afternoon-meeting.eml")
s.flush("user")

// Do noop to receive the updates.
c.C(`A003 NOOP`).Se(`* 4 EXISTS`, `* 4 RECENT`).OK(`A003`)
Expand All @@ -74,6 +76,7 @@ func TestMessageCreatedNoopUpdate(t *testing.T) {
// Create two more messages externally.
s.messageCreatedFromFile("user", other, "testdata/multipart-mixed.eml")
s.messageCreatedFromFile("user", other, "testdata/afternoon-meeting.eml")
s.flush("user")

// Do noop to receive the updates.
c.C(`A006 NOOP`).Se(`* 6 EXISTS`, `* 2 RECENT`).OK(`A006`)
Expand Down

0 comments on commit 703b2df

Please sign in to comment.