mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
; Fix 'threads-join-error' test
* test/src/thread-tests.el (threads-thread-sleeps): New helper function. (threads-join-error): Fix to work as intended, and remove the 'unstable' tag. (Bug#40823)
This commit is contained in:
parent
817f7829f9
commit
d0f96de277
1 changed files with 10 additions and 5 deletions
|
|
@ -111,14 +111,19 @@
|
|||
(skip-unless (featurep 'threads))
|
||||
(should-error (thread-join (current-thread))))
|
||||
|
||||
(defun threads-thread-sleeps ()
|
||||
"Put current thread to sleep."
|
||||
(sleep-for 5))
|
||||
|
||||
(ert-deftest threads-join-error ()
|
||||
"Test of error signaling from `thread-join'."
|
||||
:tags '(:unstable)
|
||||
(skip-unless (featurep 'threads))
|
||||
(let ((thread (make-thread #'threads-call-error)))
|
||||
(while (thread-live-p thread)
|
||||
(thread-yield))
|
||||
(should-error (thread-join thread))))
|
||||
(let ((thread (make-thread #'threads-thread-sleeps))
|
||||
err)
|
||||
(thread-signal thread 'error "Error signal for thread")
|
||||
(thread-yield)
|
||||
(setq err (should-error (thread-join thread)))
|
||||
(should (equal err '(error . "Error signal for thread")))))
|
||||
|
||||
(defvar threads-test-binding nil)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue