aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLaurence Warne2023-05-21 18:59:43 +0100
committerMattias EngdegÄrd2023-05-28 13:35:25 +0200
commite6299d2783f9aef4b0b9105650e06166ea5ed2d6 (patch)
tree48718eca23e8a63c6f5cd5b59b6660122c3dc18a /test
parent4289044ccf5a07862234903f09d6eb46ac08a925 (diff)
downloademacs-e6299d2783f9aef4b0b9105650e06166ea5ed2d6.tar.gz
emacs-e6299d2783f9aef4b0b9105650e06166ea5ed2d6.zip
Fix unstable proced test
Fix unstable proced test by omitting the revert parameter in 'proced-update'. This was caused by the process being refined on exiting between the initial 'proced' call and the successive 'proced-update' call. This resulted in proced skipping the refinement in 'proced-update', causing all processes to be shown again and the test to fail. * test/lisp/proced-tests.el (proced-refine-with-update-test): Do not use revert parameter when calling 'proced-update'.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/proced-tests.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index d69414cf43a..d53f25b00d8 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -89,14 +89,17 @@
89 (forward-line))))) 89 (forward-line)))))
90 90
91(ert-deftest proced-refine-with-update-test () 91(ert-deftest proced-refine-with-update-test ()
92 :tags '(:unstable) ; There seems to be an update race here.
93 (proced--within-buffer 92 (proced--within-buffer
94 'medium 93 'medium
95 'user 94 'user
96 (proced--move-to-column "PID") 95 (proced--move-to-column "PID")
97 (let ((pid (word-at-point))) 96 (let ((pid (word-at-point)))
98 (proced-refine) 97 (proced-refine)
99 (proced-update t) 98 ;; Don't use (proced-update t) since this will reset `proced-process-alist'
99 ;; and it's possible the process refined on would have exited by that
100 ;; point. In this case proced will skip the refinement and show all
101 ;; processes again, causing the test to fail.
102 (proced-update)
100 (while (not (eobp)) 103 (while (not (eobp))
101 (proced--move-to-column "PID") 104 (proced--move-to-column "PID")
102 (should (string= pid (word-at-point))) 105 (should (string= pid (word-at-point)))