Skip to content

Commit 462d2ba

Browse files
oleg-jukovecLeonidVas
authored andcommitted
test: fix flaky vinyl-040-utubettl.t
The sleep time in the test is equal to ttr time for a task. It can lead to the false-negative result considering that unreleased tasks are updated in a separate fiber. So we need to wait a little longer to avoid it. Closes #194
1 parent 159a43d commit 462d2ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/040-utubettl.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ test:test('ttr put/take', function(test)
9191
local my_queue = queue.create_tube('trr_test', 'utubettl', { engine = engine })
9292
test:ok(my_queue:put('ttr1', { ttr = 1 }), 'put ttr task')
9393
test:ok(my_queue:take(0.1) ~= nil, 'take this task')
94-
fiber.sleep(1)
94+
fiber.sleep(1.1)
9595
local task = my_queue:peek(0)
9696
test:is(task[2], state.READY, 'Ready state returned after one second')
9797
end)

0 commit comments

Comments
 (0)