Skip to content

Commit 8ff8bcc

Browse files
committed
Stabilize timer restart test
1 parent 69f5170 commit 8ff8bcc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/unit/timer_spec.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,18 +335,18 @@ describe('Timer', function()
335335

336336
-- Start, wait for ticks, then stop
337337
timer:start()
338-
vim.wait(30, function()
338+
assert.is_true(vim.wait(1000, function()
339339
return tick_count >= 2
340-
end)
340+
end))
341341
timer:stop()
342342

343343
local count_after_stop = tick_count
344344

345345
-- Restart and verify it works again
346346
timer:start()
347-
vim.wait(30, function()
347+
assert.is_true(vim.wait(1000, function()
348348
return tick_count > count_after_stop + 1
349-
end)
349+
end))
350350

351351
assert.is_true(tick_count > count_after_stop + 1)
352352
assert.is_true(timer:is_running())

0 commit comments

Comments
 (0)