Skip to content

Commit

Permalink
Fix flaky tests (#22)
Browse files Browse the repository at this point in the history
Some of the tests depend on timing (because I'm not mocking the time),
and need some more headroom, especially on slower machines.

Fixes #19
  • Loading branch information
markuswustenberg authored Mar 7, 2024
2 parents 1e3add3 + d0debfe commit 43814d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goqite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestQueue_Receive(t *testing.T) {

m := &goqite.Message{
Body: []byte("yo"),
Delay: time.Millisecond,
Delay: 2 * time.Millisecond,
}

err := q.Send(context.Background(), *m)
Expand All @@ -117,7 +117,7 @@ func TestQueue_Receive(t *testing.T) {
is.NotError(t, err)
is.Nil(t, m)

time.Sleep(time.Millisecond)
time.Sleep(2 * time.Millisecond)

m, err = q.Receive(context.Background())
is.NotError(t, err)
Expand Down

0 comments on commit 43814d7

Please sign in to comment.