emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 20b177d: Fix the file-notify tests for watch valida


From: Eli Zaretskii
Subject: [Emacs-diffs] master 20b177d: Fix the file-notify tests for watch validation on w32
Date: Tue, 15 Sep 2015 12:47:37 +0000

branch: master
commit 20b177d54bb0fdc1b478f3c9db88c6afca55b069
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix the file-notify tests for watch validation on w32
    
    * test/automated/file-notify-tests.el
    (file-notify-test04-file-validity): Move the directory deletion
    out of the file-notify--test-with-events macro.
    (file-notify-test04-file-validity)
    (file-notify-test05-dir-validity): Enlarge the timeout of
    read-event to 0.5, as 0.1 is borderline on w32.  (Bug#21432)
---
 test/automated/file-notify-tests.el |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/automated/file-notify-tests.el 
b/test/automated/file-notify-tests.el
index 3e92925..b962aa7 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -386,17 +386,17 @@ Don't wait longer than TIMEOUT seconds for the events to 
be delivered."
                                       '(change)
                                       #'file-notify--test-event-handler))
         (file-notify--test-with-events
-            3 3 (lambda (events)
-                  (should (equal '(created changed deleted)
+            2 3 (lambda (events)
+                  (should (equal '(created changed)
                                  (mapcar #'cadr events))))
           (should (file-notify-valid-p file-notify--test-desc))
           (write-region
            "any text" nil file-notify--test-tmpfile nil 'no-message)
-          (should (file-notify-valid-p file-notify--test-desc))
-          (delete-directory temporary-file-directory t))
+          (should (file-notify-valid-p file-notify--test-desc)))
         ;; After deleting the parent, the descriptor must not be valid
         ;; anymore.
-        (should-not (file-notify-valid-p file-notify--test-desc)))
+        (delete-directory temporary-file-directory t)
+        (read-event nil nil 0.5))
 
     ;; Exit.
     (file-notify--test-cleanup)))
@@ -420,7 +420,7 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
         (delete-directory file-notify--test-tmpfile t)
         ;; After deleting the directory, the descriptor must not be
         ;; valid anymore.
-        (read-event nil nil 0.1)
+        (read-event nil nil 0.5)
         (should-not (file-notify-valid-p file-notify--test-desc)))
 
     ;; Exit.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]