From: Tomi Ollila Date: Sun, 5 Aug 2012 11:13:01 +0000 (+0300) Subject: test: emacs: call accept-process-output in notmuch-test-wait X-Git-Tag: 0.15_rc1~263 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=f791cc9247dfac8640c8896bad9d9c1a1e70edfc;ds=sidebyside 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. --- diff --git a/test/test-lib.el b/test/test-lib.el index 5dd6271c..52d99361 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -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."