From: Michael Albinus Date: Fri, 14 Jul 2017 08:55:31 +0000 (+0200) Subject: Adjust timer in tramp-test36-asynchronous-requests X-Git-Tag: emacs-26.0.90~518^2~115 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=05c7c8278eba6faf8c4fcf89f4bb7912f36fdc12;p=emacs.git Adjust timer in tramp-test36-asynchronous-requests * test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests): Adjust timer if it takes too much time. --- diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 263e1359066..07d319bce0f 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -3726,12 +3726,18 @@ process sentinels. They shall not disturb each other." 0 timer-repeat (lambda () (when buffers - (let ((default-directory tmp-name) + (let ((time (float-time)) + (default-directory tmp-name) (file (buffer-name (nth (random (length buffers)) buffers)))) (tramp--test-message "Start timer %s %s" file (current-time-string)) (funcall timer-operation file) + ;; Adjust timer if it takes too much time. + (when (> (- (float-time) time) timer-repeat) + (setq timer-repeat (* 1.5 timer-repeat)) + (setf (timer--repeat-delay timer) timer-repeat) + (tramp--test-message "Increase timer %s" timer-repeat)) (tramp--test-message "Stop timer %s %s" file (current-time-string)))))))