Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Sep 1, 2023
1 parent e61318c commit 5785455
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions queue/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ func TestUpdateDone(t *testing.T) {
q := NewBackgroundQueue()

id := q.Enqueue()
done, err, exists := q.Done(id)
exists, done, _, err := q.Done(id)
c.Assert(exists, qt.IsTrue)
c.Assert(err, qt.IsNil)
c.Assert(done, qt.IsFalse)

c.Assert(q.Update(id, true, fmt.Errorf("test error")), qt.IsTrue)
done, err, exists = q.Done(id)
c.Assert(q.Update(id, true, nil, fmt.Errorf("test error")), qt.IsTrue)
exists, done, _, err = q.Done(id)
c.Assert(exists, qt.IsTrue)
c.Assert(err, qt.IsNotNil)
c.Assert(done, qt.IsTrue)

c.Assert(q.Dequeue(id), qt.IsTrue)
done, err, exists = q.Done(id)
exists, done, _, err = q.Done(id)
c.Assert(exists, qt.IsFalse)
c.Assert(err, qt.IsNil)
c.Assert(done, qt.IsFalse)
Expand Down

0 comments on commit 5785455

Please sign in to comment.