:tags '(:expensive-test)
(skip-unless (file-notify--test-local-enabled))
- ;; `auto-revert-buffers' runs every 5". And we must wait, until the
- ;; file has been reverted.
- (let ((timeout (if (file-remote-p temporary-file-directory) 60 10))
- buf)
+ ;; Run with shortened `auto-revert-interval' for a faster test.
+ (let* ((auto-revert-interval 1)
+ (timeout (if (file-remote-p temporary-file-directory)
+ 60 ; FIXME: can this be shortened?
+ (* auto-revert-interval 2.5)))
+ buf)
+ (auto-revert-set-timer)
(unwind-protect
(progn
;; In the remote case, `vc-refresh-state' returns undesired
(sleep-for 1)
(auto-revert-mode 1)
- ;; `auto-revert-buffers' runs every 5".
(with-timeout (timeout (ignore))
(while (null auto-revert-notify-watch-descriptor)
- (sleep-for 1)))
+ (sleep-for 0.2)))
;; `file-notify--test-monitor' needs to know
;; `file-notify--test-desc' in order to compute proper