Tweak tramp-test45-asynchronous-requests

* test/lisp/net/tramp-tests.el (tramp-use-connection-share): Declare.
(tramp--test-putty-p): New defun.
(tramp-test45-asynchronous-requests): Tweak test.
This commit is contained in:
Michael Albinus 2023-05-16 17:19:20 +02:00
parent f836452beb
commit 2b1e81df06

View file

@ -73,6 +73,7 @@
(defvar tramp-persistency-file-name)
(defvar tramp-remote-path)
(defvar tramp-remote-process-environment)
(defvar tramp-use-connection-share)
;; Needed for Emacs 27.
(defvar lock-file-name-transforms)
@ -6933,6 +6934,13 @@ This does not support external Emacs calls."
"Check, whether an out-of-band method is used."
(tramp-method-out-of-band-p tramp-test-vec 1))
(defun tramp--test-putty-p ()
"Check, whether the method method usaes PuTTY.
This does not support connection share for more than two connections."
(member
(file-remote-p ert-remote-temporary-file-directory 'method)
'("plink" "plinkx" "pscp" "psftp")))
(defun tramp--test-rclone-p ()
"Check, whether the remote host is offered by rclone.
This requires restrictions of file name syntax."
@ -7486,6 +7494,10 @@ process sentinels. They shall not disturb each other."
(string-to-number (getenv "REMOTE_PARALLEL_PROCESSES"))))
((getenv "EMACS_HYDRA_CI") 5)
(t 10)))
;; PuTTY-based methods can only share up to 10 connections.
(tramp-use-connection-share
(if (and (tramp--test-putty-p) (>= number-proc 10))
'suppress (bound-and-true-p tramp-use-connection-share)))
;; On hydra, timings are bad.
(timer-repeat
(cond