tramp-verbose 0
tramp-message-show-message nil)
-(defconst auto-revert--timeout 10
+(defconst auto-revert--timeout (1+ auto-revert-interval)
"Time to wait for a message.")
(defvar auto-revert--messages nil
(declare (indent 1))
`(ert-deftest ,(intern (concat (symbol-name test) "-remote")) ()
,docstring
- :tags '(:expensive-test)
+ :tags '(:expensive-test :unstable)
(let ((temporary-file-directory
auto-revert-test-remote-temporary-file-directory)
(auto-revert-remote-files t)
(file-2 (make-temp-file "global-auto-revert-test-2"))
(file-3 (make-temp-file "global-auto-revert-test-3"))
(file-2b (concat file-2 "-b"))
- buf-1 buf-2 buf-3)
+ require-final-newline buf-1 buf-2 buf-3)
(unwind-protect
(progn
(setq buf-1 (find-file-noselect file-1))
(auto-revert-test--wait-for
(lambda () (buffer-local-value
'auto-revert-notify-watch-descriptor buf-3))
- (+ auto-revert-interval 1))
+ auto-revert--timeout)
(should (buffer-local-value
'auto-revert-notify-watch-descriptor buf-3))
(auto-revert-test--write-file "3-a" file-3)
(sleep-for 0.5)
(should (equal (auto-revert-test--buffer-string buf-1) "1-a"))
(auto-revert-test--write-file "1-b" file-1)
- (auto-revert-test--wait-for-buffer-text buf-1 "1-b"
- (+ auto-revert-interval 1))
+ (auto-revert-test--wait-for-buffer-text
+ buf-1 "1-b" auto-revert--timeout)
(should (buffer-local-value
'auto-revert-notify-watch-descriptor buf-1))
(write-file file-2b))
(should (equal (auto-revert-test--buffer-string buf-2) "2-a"))
(auto-revert-test--write-file "2-b" file-2b)
- (auto-revert-test--wait-for-buffer-text buf-2 "2-b"
- (+ auto-revert-interval 1))
+ (auto-revert-test--wait-for-buffer-text
+ buf-2 "2-b" auto-revert--timeout)
(should (buffer-local-value
'auto-revert-notify-watch-descriptor buf-2)))
(let* ((auto-revert-use-notify t)
(file-1 (make-temp-file "auto-revert-test"))
(file-2 (concat file-1 "-2"))
- (buf nil))
+ require-final-newline buf)
(unwind-protect
(progn
(setq buf (find-file-noselect file-1))
(auto-revert-test--write-file "C" file-2)
(auto-revert-test--wait-for-buffer-text
- buf "C" (+ auto-revert-interval 1))
+ buf "C" auto-revert--timeout)
(should (equal (buffer-string) "C"))))
;; Clean up.