Skip to content

Commit 1d77b74

Browse files
committed
Async.Promise: Extend another timeout in the test
1 parent 1f84c67 commit 1d77b74

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/Async/Promise.vimspec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
function! s:wait_has_key(obj, name) abort
2+
return s:wait_has_key_with_timeout(a:obj, a:name, 5)
3+
endfunction
4+
5+
function! s:wait_has_key_with_timeout(obj, name, timeout_sec) abort
26
let i = 0
3-
while i < 500
7+
while i < a:timeout_sec * 100
48
sleep 10m
59
if has_key(a:obj, a:name)
610
return
@@ -621,7 +625,7 @@ Describe Async.Promise
621625
Assert Equals(p._state, FULFILLED)
622626
let l = l:
623627
call p.then({x -> extend(l, {'result' : x})})
624-
call s:wait_has_key(l, 'result')
628+
call s:wait_has_key_with_timeout(l, 'result', 50) " 10 times longer than default
625629
Assert Equals(result, 42)
626630
unlet result
627631
endfor

0 commit comments

Comments
 (0)