summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-12-30 16:44:13 +0200
committerEli Zaretskii <eliz@gnu.org>2021-12-30 16:44:13 +0200
commit6738c1cc8cb720087c2c3fffcc98a410063cb381 (patch)
treef449e114c69315a67ecccb370f7cea33e6261c97 /test/lisp/emacs-lisp
parenta67b1f1944262f41e58c87f09d28858725aa5ca9 (diff)
downloademacs-6738c1cc8cb720087c2c3fffcc98a410063cb381.tar.gz
emacs-6738c1cc8cb720087c2c3fffcc98a410063cb381.tar.bz2
emacs-6738c1cc8cb720087c2c3fffcc98a410063cb381.zip
Fix multisession-tests on MS-Windows
* test/lisp/emacs-lisp/multisession-tests.el (multi-test-files-simple): On MS-Windows and Haiku, wait before invoking the Emacs sub-process, not after, to ensure the later update is detected with 1-sec file time resolution.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/multisession-tests.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/lisp/emacs-lisp/multisession-tests.el b/test/lisp/emacs-lisp/multisession-tests.el
index 57ca420488e..17457d9be2f 100644
--- a/test/lisp/emacs-lisp/multisession-tests.el
+++ b/test/lisp/emacs-lisp/multisession-tests.el
@@ -116,6 +116,10 @@
(should (= (multisession-value multisession--sfoo) 0))
(cl-incf (multisession-value multisession--sfoo))
(should (= (multisession-value multisession--sfoo) 1))
+ ;; On Windows and Haiku, we don't have sub-second resolution, so
+ ;; let some time pass to make the "later" logic work.
+ (when (memq system-type '(windows-nt haiku))
+ (sleep-for 0.6))
(call-process
(concat invocation-directory invocation-name)
nil t nil
@@ -130,9 +134,6 @@
""
:synchronized t)
(cl-incf (multisession-value multisession--sfoo))))))
- ;; On Windows, we don't have sub-second resolution.
- (when (memq system-type '(windows-nt haiku))
- (sleep-for 2))
(should (= (multisession-value multisession--sfoo) 2)))))
(ert-deftest multi-test-files-busy ()