diff options
| author | Michael Albinus | 2015-11-19 16:56:28 +0100 |
|---|---|---|
| committer | Michael Albinus | 2015-11-19 16:56:28 +0100 |
| commit | 4e4180a478aba1f3b66adaab8c0284d215ad6e03 (patch) | |
| tree | 2d84e6c62121d0fda220b8851207424088efb52a | |
| parent | a81fe30a764c117e87e9da13f19b46d0ba6d35a8 (diff) | |
| download | emacs-4e4180a478aba1f3b66adaab8c0284d215ad6e03.tar.gz emacs-4e4180a478aba1f3b66adaab8c0284d215ad6e03.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.el | 12 |
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]." |