emacs-diffs
[Top][All Lists]
Advanced

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

master 6738c1cc8c: Fix multisession-tests on MS-Windows


From: Eli Zaretskii
Subject: master 6738c1cc8c: Fix multisession-tests on MS-Windows
Date: Thu, 30 Dec 2021 09:45:26 -0500 (EST)

branch: master
commit 6738c1cc8cb720087c2c3fffcc98a410063cb381
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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.
---
 test/lisp/emacs-lisp/multisession-tests.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/lisp/emacs-lisp/multisession-tests.el 
b/test/lisp/emacs-lisp/multisession-tests.el
index 57ca420488..17457d9be2 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 ()



reply via email to

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