aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-11-19 16:56:28 +0100
committerMichael Albinus2015-11-25 15:07:12 +0100
commit6b490c070931899a779c3717a2f19625d9e16b19 (patch)
tree1425a137f608e1444587c9331639743cd2fa28d2
parentc8e266ff5f1862567a9f4b77b2d90b8586b12539 (diff)
downloademacs-6b490c070931899a779c3717a2f19625d9e16b19.tar.gz
emacs-6b490c070931899a779c3717a2f19625d9e16b19.zip
Improve loops in file-notify-test06-many-events
* test/automated/file-notify-tests.el (file-notify-test06-many-events): Use `read-event' pauses for the `write-file' loops; otherwise events are lost in inotify and gfilenotify cases.
-rw-r--r--test/automated/file-notify-tests.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
index b9cd192dd19..81fb42e13b1 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -657,10 +657,12 @@ Don't wait longer than timeout seconds for the events to be delivered."
657 (push (expand-file-name (format "x%d" i)) x-file-list) 657 (push (expand-file-name (format "x%d" i)) x-file-list)
658 (push (expand-file-name (format "y%d" i)) y-file-list)) 658 (push (expand-file-name (format "y%d" i)) y-file-list))
659 (file-notify--test-with-events (make-list (+ n n) 'created) 659 (file-notify--test-with-events (make-list (+ n n) 'created)
660 (dolist (file x-file-list) 660 (let ((x-file-list x-file-list)
661 (write-region "" nil file nil 'no-message)) 661 (y-file-list y-file-list))
662 (dolist (file y-file-list) 662 (while (and x-file-list y-file-list)
663 (write-region "" nil file nil 'no-message))) 663 (write-region "" nil (pop x-file-list) nil 'no-message)
664 (read-event nil nil 0.1)
665 (write-region "" nil (pop y-file-list) nil 'no-message))))
664 (file-notify--test-with-events (make-list n 'renamed) 666 (file-notify--test-with-events (make-list n 'renamed)
665 (let ((x-file-list x-file-list) 667 (let ((x-file-list x-file-list)
666 (y-file-list y-file-list)) 668 (y-file-list y-file-list))
@@ -672,7 +674,7 @@ Don't wait longer than timeout seconds for the events to be delivered."
672 (file-notify--test-cleanup))) 674 (file-notify--test-cleanup)))
673 675
674(file-notify--deftest-remote file-notify-test06-many-events 676(file-notify--deftest-remote file-notify-test06-many-events
675 "Check that events are not dropped remote directories.") 677 "Check that events are not dropped for remote directories.")
676 678
677(defun file-notify-test-all (&optional interactive) 679(defun file-notify-test-all (&optional interactive)
678 "Run all tests for \\[file-notify]." 680 "Run all tests for \\[file-notify]."