From de82236aee242026040cbfd57d1836a9af459531 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 27 Nov 2024 14:49:42 +0100 Subject: [PATCH] Queue tests: extend time in waitForProcess() to work agents under load too (#4455) --- server/queue/fifo_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/queue/fifo_test.go b/server/queue/fifo_test.go index 1ce4de008..90361255d 100644 --- a/server/queue/fifo_test.go +++ b/server/queue/fifo_test.go @@ -35,7 +35,7 @@ var ( Data: []byte("{}"), } } - waitForProcess = func() { time.Sleep(processTimeInterval + 10*time.Millisecond) } + waitForProcess = func() { time.Sleep(processTimeInterval + 50*time.Millisecond) } ) func TestFifo(t *testing.T) { @@ -83,10 +83,10 @@ func TestFifoExpire(t *testing.T) { assert.Len(t, info.Pending, 1, "expect task in pending queue") got, err := q.Poll(ctx, 1, filterFnTrue) - waitForProcess() assert.NoError(t, err) assert.Equal(t, dummyTask, got) + waitForProcess() info = q.Info(ctx) assert.Len(t, info.Pending, 1, "expect task re-added to pending queue") }