emacs-diffs
[Top][All Lists]
Advanced

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

master 4de46e6 1/2: Fix timeout problem in autorevert-tests.el


From: Michael Albinus
Subject: master 4de46e6 1/2: Fix timeout problem in autorevert-tests.el
Date: Sun, 19 Dec 2021 09:21:45 -0500 (EST)

branch: master
commit 4de46e6872d31c151c13e3fde97b43902cb06588
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Fix timeout problem in autorevert-tests.el
    
    * test/lisp/autorevert-tests.el (auto-revert-test05-global-notify):
    Remove debug message.  Increase timeout.
---
 test/lisp/autorevert-tests.el | 26 ++++++--------------------
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el
index b31f0a9..2508b6a 100644
--- a/test/lisp/autorevert-tests.el
+++ b/test/lisp/autorevert-tests.el
@@ -281,9 +281,9 @@ This expects `auto-revert--messages' to be bound by
 (ert-deftest auto-revert-test02-auto-revert-deleted-file ()
   "Check autorevert for a deleted file."
   ;; Repeated unpredictable failures, bug#32645.
-  ;; Unlikely to be hydra-specific?
-                                        ;  (skip-unless (not (getenv 
"EMACS_HYDRA_CI")))
   :tags '(:unstable)
+  ;; Unlikely to be hydra-specific?
+  ;; (skip-unless (not (getenv "EMACS_HYDRA_CI")))
   (with-auto-revert-test
    (ert-with-temp-file tmpfile
      (let (;; Try to catch bug#32645.
@@ -484,8 +484,6 @@ This expects `auto-revert--messages' to be bound by
        (ert-with-temp-file file-3
          (let* ((auto-revert-use-notify t)
                 (auto-revert-avoid-polling t)
-                (auto-revert-debug (getenv "EMACS_EMBA_CI"))
-                (file-notify-debug (getenv "EMACS_EMBA_CI"))
                 (was-in-global-auto-revert-mode global-auto-revert-mode)
                 (file-2b (concat file-2 "-b"))
                 require-final-newline buf-1 buf-2 buf-3)
@@ -531,28 +529,16 @@ This expects `auto-revert--messages' to be bound by
                  (should (equal (auto-revert-test--buffer-string buf-3) "3-a"))
 
                  ;; Delete a visited file, and re-create it with new contents.
-                 (when auto-revert-debug (message "Hallo0"))
                  (delete-file file-1)
-                 (when auto-revert-debug (message "Hallo1"))
                  (should (equal (auto-revert-test--buffer-string buf-1) "1-a"))
-                 (when auto-revert-debug (message "Hallo2"))
                  (auto-revert-test--write-file "1-b" file-1)
-                 (when auto-revert-debug (message "Hallo3"))
+                 ;; Since the file is deleted, it needs at least
+                 ;; `autorevert-interval' to recognize the new file,
+                 ;; while polling.  So increase the timeout.
                  (auto-revert-test--wait-for-buffer-text
-                  buf-1 "1-b" (auto-revert--timeout))
-                 ;; On emba, `buf-1' is a killed buffer.
-                 (when auto-revert-debug
-                   (message
-                    "Hallo4 %s %s %s %s %s %s %s"
-                    buf-1 (buffer-name buf-1) (buffer-live-p buf-1)
-                    file-1 (get-file-buffer file-1)
-                    (buffer-name (get-file-buffer file-1))
-                    (buffer-live-p (get-file-buffer file-1)))
-                   (with-current-buffer buf-1
-                     (message "Hallo5\n%s" (buffer-local-variables))))
+                  buf-1 "1-b" (* 2 (auto-revert--timeout)))
                  (should (buffer-local-value
                           'auto-revert-notify-watch-descriptor buf-1))
-                 (when auto-revert-debug (message "Hallo6"))
 
                  ;; Write a buffer to a new file, then modify the new file on 
disk.
                  (with-current-buffer buf-2



reply via email to

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