gnustest-nntp: Do not use `sleep-for' to wait for ping
authorDavid Engster <deng@randomsample.de>
Sun, 31 May 2015 10:11:48 +0000 (12:11 +0200)
committerDavid Engster <deng@randomsample.de>
Sun, 31 May 2015 10:11:48 +0000 (12:11 +0200)
* tests/gnustest-nntp.el (gnustest-ping-host): Call 'sleep' binary
instead of using `sleep-for', as the latter does not seem to reliably
wait (see for instance bug 15990).

lisp/ChangeLog
lisp/tests/gnustest-nntp.el

index 6539a61..6e4daca 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-31  David Engster  <deng@randomsample.de>
+
+       * tests/gnustest-nntp.el (gnustest-ping-host): Call 'sleep' binary
+       instead of using `sleep-for', as the latter does not seem to reliably
+       wait (see for instance bug 15990).
+
 2015-05-29  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-button-alist): Re-revert last change.
index 0dbd801..0d5cccb 100644 (file)
@@ -42,7 +42,8 @@
   (let* ((ping-program-options '("-c" "1"))
         (buf (ping host))
         proc)
-    (sleep-for 0.5)
+    ;; sleep-for does not work correctly with async processes running
+    (call-process "sleep" nil nil nil "2")
     (with-current-buffer buf
       (accept-process-output (get-buffer-process (current-buffer)) 2)
       (goto-char (point-min))