From cf3b871fa940c42e9c94257118f7d1131ebd362a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Aug 2022 15:21:46 +0800 Subject: test: use poke_eventloop() instead of sleep(10) where possible (#19794) Using sleep(10) to wait for typeahead to finish is flaky, especially on macOS, where legacy/global_spec.lua has failed several times. --- test/functional/legacy/ex_mode_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/legacy/ex_mode_spec.lua') diff --git a/test/functional/legacy/ex_mode_spec.lua b/test/functional/legacy/ex_mode_spec.lua index a8f54c6939..f21c47e175 100644 --- a/test/functional/legacy/ex_mode_spec.lua +++ b/test/functional/legacy/ex_mode_spec.lua @@ -6,7 +6,7 @@ local eq = helpers.eq local eval = helpers.eval local feed = helpers.feed local meths = helpers.meths -local sleep = helpers.sleep +local poke_eventloop = helpers.poke_eventloop before_each(clear) @@ -143,7 +143,7 @@ describe('Ex mode', function() ^ | ]]) feed('') - sleep(10) -- Wait for input to be flushed + poke_eventloop() -- Wait for input to be flushed feed('foo') screen:expect([[ Entering Ex mode. Type "visual" to go to Normal mode. | -- cgit