]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert change to use seq-random-elt in Tramp test
authorStefan Kangas <stefan@marxist.se>
Fri, 24 Sep 2021 20:17:04 +0000 (22:17 +0200)
committerStefan Kangas <stefan@marxist.se>
Fri, 24 Sep 2021 20:19:22 +0000 (22:19 +0200)
* 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.

test/lisp/net/tramp-tests.el

index f105c6f60ba0426b7d4508b1822774ac31ce09cb..358f87d84c968473dd514ac2ce22b4a2d71ac653 100644 (file)
@@ -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)))