mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
; * test/lisp/jsonrpc-tests.el: Adjust timeouts for CI EMBA testing
This commit is contained in:
parent
eb90c528f3
commit
6bd73af241
1 changed files with 6 additions and 5 deletions
|
|
@ -177,25 +177,26 @@ INITARGS are passed to `make-instance' for `jsonrpc--test-client'."
|
||||||
;; This returns immediately
|
;; This returns immediately
|
||||||
(jsonrpc-async-request
|
(jsonrpc-async-request
|
||||||
conn
|
conn
|
||||||
'sit-for [0.1]
|
'sit-for [0.01]
|
||||||
:success-fn
|
:success-fn
|
||||||
(lambda (_result)
|
(lambda (_result)
|
||||||
;; this only gets runs after the "first deferred" is stashed.
|
;; this only gets runs after the "first deferred" is stashed.
|
||||||
(setq n-deferred-1
|
(setq n-deferred-1
|
||||||
(hash-table-count (jsonrpc--deferred-actions conn)))))
|
(hash-table-count (jsonrpc--deferred-actions conn)))))
|
||||||
(should-error
|
(should-error
|
||||||
;; This stashes the request and waits. It will error because
|
;; This stashes the request and waits. It will error with a
|
||||||
;; no-one clears the "hold deferred" flag.
|
;; timeout after blocking for 1 sec because no-one clears the
|
||||||
|
;; "hold deferred" flag.
|
||||||
(jsonrpc-request conn 'ignore ["first deferred"]
|
(jsonrpc-request conn 'ignore ["first deferred"]
|
||||||
:deferred "first deferred"
|
:deferred "first deferred"
|
||||||
:timeout 0.5)
|
:timeout 1.0)
|
||||||
:type 'jsonrpc-error)
|
:type 'jsonrpc-error)
|
||||||
;; The error means the deferred actions stash is now empty
|
;; The error means the deferred actions stash is now empty
|
||||||
(should (zerop (hash-table-count (jsonrpc--deferred-actions conn))))
|
(should (zerop (hash-table-count (jsonrpc--deferred-actions conn))))
|
||||||
;; Again, this returns immediately.
|
;; Again, this returns immediately.
|
||||||
(jsonrpc-async-request
|
(jsonrpc-async-request
|
||||||
conn
|
conn
|
||||||
'sit-for [0.1]
|
'sit-for [0.01]
|
||||||
:success-fn
|
:success-fn
|
||||||
(lambda (_result)
|
(lambda (_result)
|
||||||
;; This gets run while "third deferred" below is waiting for
|
;; This gets run while "third deferred" below is waiting for
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue