diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-09-24 22:17:04 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-09-24 22:19:22 +0200 |
commit | 2ee5c80ff5454320a0bbe8c2d5b32eb2f0b46bdb (patch) | |
tree | 5a0e1560c70dd335f6f1a29bed5bbc00c39e7efb /test/lisp/net | |
parent | 54cfadd92f080572f6f2ccf89829d38daaa56529 (diff) | |
download | emacs-2ee5c80ff5454320a0bbe8c2d5b32eb2f0b46bdb.tar.gz emacs-2ee5c80ff5454320a0bbe8c2d5b32eb2f0b46bdb.tar.bz2 emacs-2ee5c80ff5454320a0bbe8c2d5b32eb2f0b46bdb.zip |
Revert change to use seq-random-elt in Tramp test
* test/lisp/net/tramp-tests.el (tramp-test44-asynchronous-requests):
Revert change to use seq-random-elt, as Tramp needs to be compatible
with Emacs 25, and the function was only added in 26.1.
Diffstat (limited to 'test/lisp/net')
-rw-r--r-- | test/lisp/net/tramp-tests.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index f105c6f60ba..358f87d84c9 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -6787,7 +6787,10 @@ process sentinels. They shall not disturb each other." (let ((time (float-time)) (default-directory tmp-name) (file - (buffer-name (seq-random-elt buffers))) + (buffer-name + ;; Use `seq-random-elt' once <26.1 support + ;; is dropped. + (nth (random (length buffers)) buffers))) ;; A remote operation in a timer could ;; confuse Tramp heavily. So we ignore this ;; error here. @@ -6852,7 +6855,8 @@ process sentinels. They shall not disturb each other." ;; the buffers. Mix with regular operation. (let ((buffers (copy-sequence buffers))) (while buffers - (let* ((buf (seq-random-elt buffers)) + ;; Use `seq-random-elt' once <26.1 support is dropped. + (let* ((buf (nth (random (length buffers)) buffers)) (proc (get-buffer-process buf)) (file (process-get proc 'foo)) (count (process-get proc 'bar))) |