diff options
| author | Michael Albinus | 2017-07-14 10:55:31 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-07-14 10:55:31 +0200 |
| commit | 05c7c8278eba6faf8c4fcf89f4bb7912f36fdc12 (patch) | |
| tree | 9d678562e6da39d89d6407a4de2035a445f34c41 /test | |
| parent | 4d3657af329cb001fa4a1d74b214c349e66185da (diff) | |
| download | emacs-05c7c8278eba6faf8c4fcf89f4bb7912f36fdc12.tar.gz emacs-05c7c8278eba6faf8c4fcf89f4bb7912f36fdc12.zip | |
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 8 |
1 files changed, 7 insertions, 1 deletions
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." | |||
| 3726 | 0 timer-repeat | 3726 | 0 timer-repeat |
| 3727 | (lambda () | 3727 | (lambda () |
| 3728 | (when buffers | 3728 | (when buffers |
| 3729 | (let ((default-directory tmp-name) | 3729 | (let ((time (float-time)) |
| 3730 | (default-directory tmp-name) | ||
| 3730 | (file | 3731 | (file |
| 3731 | (buffer-name (nth (random (length buffers)) buffers)))) | 3732 | (buffer-name (nth (random (length buffers)) buffers)))) |
| 3732 | (tramp--test-message | 3733 | (tramp--test-message |
| 3733 | "Start timer %s %s" file (current-time-string)) | 3734 | "Start timer %s %s" file (current-time-string)) |
| 3734 | (funcall timer-operation file) | 3735 | (funcall timer-operation file) |
| 3736 | ;; Adjust timer if it takes too much time. | ||
| 3737 | (when (> (- (float-time) time) timer-repeat) | ||
| 3738 | (setq timer-repeat (* 1.5 timer-repeat)) | ||
| 3739 | (setf (timer--repeat-delay timer) timer-repeat) | ||
| 3740 | (tramp--test-message "Increase timer %s" timer-repeat)) | ||
| 3735 | (tramp--test-message | 3741 | (tramp--test-message |
| 3736 | "Stop timer %s %s" file (current-time-string))))))) | 3742 | "Stop timer %s %s" file (current-time-string))))))) |
| 3737 | 3743 | ||