[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0cb1d695b42: Attempt to speed up filenotify-tests
From: |
Mattias Engdegård |
Subject: |
master 0cb1d695b42: Attempt to speed up filenotify-tests |
Date: |
Mon, 22 May 2023 11:59:54 -0400 (EDT) |
branch: master
commit 0cb1d695b429fceb45a11cd7ed73f3bb9ce7002f
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Attempt to speed up filenotify-tests
* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Run with a lower `auto-revert-interval` (1 s) and adjust the
a timeout value. This should lower the time for this particular
test from 25 to below 10 s.
---
test/lisp/filenotify-tests.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 97b7c46c689..0873910ddf9 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -939,10 +939,13 @@ delivered."
: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
@@ -960,10 +963,9 @@ delivered."
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0cb1d695b42: Attempt to speed up filenotify-tests,
Mattias Engdegård <=