We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f84c67 commit 1d77b74Copy full SHA for 1d77b74
test/Async/Promise.vimspec
@@ -1,6 +1,10 @@
1
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
6
let i = 0
- while i < 500
7
+ while i < a:timeout_sec * 100
8
sleep 10m
9
if has_key(a:obj, a:name)
10
return
@@ -621,7 +625,7 @@ Describe Async.Promise
621
625
Assert Equals(p._state, FULFILLED)
622
626
let l = l:
623
627
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
629
Assert Equals(result, 42)
630
unlet result
631
endfor
0 commit comments