]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the new condvar test
authorEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2017 16:05:38 +0000 (18:05 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2017 16:05:38 +0000 (18:05 +0200)
* test/src/thread-tests.el (threads-condvar-wait): Enlarge the
time we sleep in the main thread to let the other thread
process notifications.

test/src/thread-tests.el

index 61809e1681b93b7131273eb12792586be652eafe..22ea90727ce830416b3bda33e8142ded898759e0 100644 (file)
     ;; Notify the waiting thread.
     (with-mutex cv-mutex
       (condition-notify threads-condvar t))
-    ;; Allow new-thread to process the notification.
-    (sleep-for 0.1)
+    ;; Allow new-thread to process the notification.  Sleeping for too
+    ;; short time here will fail the length test below.
+    (sleep-for 1)
     ;; Make sure the thread is still there.  This used to fail due to
     ;; a bug in thread.c:condition_wait_callback.
     (should (thread-alive-p new-thread))