From 5e2cf8c804fe5fb3f97e0d777c0e0d8efd00b89a Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 8 May 2017 15:11:23 -0400 Subject: [PATCH] Skip a test from filenotify-tests.el on Cygwin * test/lisp/filenotify-tests.el (file-notify-test02-rm-watch): Skip the last part of the test on Cygwin; it fails due to timing issues. (file-notify--test-read-event): Remove `sit-for' that was added for Cygwin. --- test/lisp/filenotify-tests.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 78a68f21bd1..8a31c2cd8b5 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -69,7 +69,6 @@ (defun file-notify--test-read-event () "Read one event. There are different timeouts for local and remote file notification libraries." - (sit-for 0.001 'nodisp) (read-event nil nil (cond @@ -405,7 +404,11 @@ This returns only for the local case and gfilenotify; otherwise it is nil. (file-notify--test-cleanup)) (unwind-protect - ;; Check, that removing watch descriptors out of order do not harm. + ;; Check, that removing watch descriptors out of order do not + ;; harm. This fails on Cygwin because of timing issues unless a + ;; long `sit-for' is added before the call to + ;; `file-notify--test-read-event'. + (if (not (eq system-type 'cygwin)) (let (results) (cl-flet ((first-callback (event) (when (eq (nth 1 event) 'deleted) (push 1 results))) @@ -434,7 +437,7 @@ This returns only for the local case and gfilenotify; otherwise it is nil. (should (equal results (list 2))) ;; The environment shall be cleaned up. - (file-notify--test-cleanup-p))) + (file-notify--test-cleanup-p)))) ;; Cleanup. (file-notify--test-cleanup))) -- 2.39.2