test: emacs: call accept-process-output in notmuch-test-wait

notmuch-test-wait called sleep-for in a loop to wait unconditionally 0.1
seconds while waiting for process to exit.
accept-process-output returns as soon as there is any data available
from process, so using it avoids unnecessary fixed delays.
Both of these functions run process sentinels.
This commit is contained in:
Tomi Ollila 2012-08-05 14:13:01 +03:00 committed by David Bremner
parent 1f30f7d290
commit f791cc9247

View file

@ -38,7 +38,7 @@
(defun notmuch-test-wait ()
"Wait for process completion."
(while (get-buffer-process (current-buffer))
(sleep-for 0.1)))
(accept-process-output nil 0.1)))
(defun test-output (&optional filename)
"Save current buffer to file FILENAME. Default FILENAME is OUTPUT."