diff options
| author | Eli Zaretskii | 2019-06-15 13:16:36 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-06-15 13:16:36 +0300 |
| commit | 33c585edd4e228ea24f0d3924571c7d950079073 (patch) | |
| tree | 1ed3716ef7f34c7d539318c088be81090265baa6 /test | |
| parent | 2a364d84c18527c344dec6f5bd577861df3f1679 (diff) | |
| parent | e1867056ae7ef3ffce90d4b2564a9e81b54818ba (diff) | |
| download | emacs-33c585edd4e228ea24f0d3924571c7d950079073.tar.gz emacs-33c585edd4e228ea24f0d3924571c7d950079073.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/autorevert-tests.el | 20 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 3 |
2 files changed, 12 insertions, 11 deletions
diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el index f21fb864f27..37301ffe430 100644 --- a/test/lisp/autorevert-tests.el +++ b/test/lisp/autorevert-tests.el | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | tramp-verbose 0 | 62 | tramp-verbose 0 |
| 63 | tramp-message-show-message nil) | 63 | tramp-message-show-message nil) |
| 64 | 64 | ||
| 65 | (defconst auto-revert--timeout 10 | 65 | (defconst auto-revert--timeout (1+ auto-revert-interval) |
| 66 | "Time to wait for a message.") | 66 | "Time to wait for a message.") |
| 67 | 67 | ||
| 68 | (defvar auto-revert--messages nil | 68 | (defvar auto-revert--messages nil |
| @@ -140,7 +140,7 @@ This expects `auto-revert--messages' to be bound by | |||
| 140 | (declare (indent 1)) | 140 | (declare (indent 1)) |
| 141 | `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () | 141 | `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () |
| 142 | ,docstring | 142 | ,docstring |
| 143 | :tags '(:expensive-test) | 143 | :tags '(:expensive-test :unstable) |
| 144 | (let ((temporary-file-directory | 144 | (let ((temporary-file-directory |
| 145 | auto-revert-test-remote-temporary-file-directory) | 145 | auto-revert-test-remote-temporary-file-directory) |
| 146 | (auto-revert-remote-files t) | 146 | (auto-revert-remote-files t) |
| @@ -471,7 +471,7 @@ This expects `auto-revert--messages' to be bound by | |||
| 471 | (file-2 (make-temp-file "global-auto-revert-test-2")) | 471 | (file-2 (make-temp-file "global-auto-revert-test-2")) |
| 472 | (file-3 (make-temp-file "global-auto-revert-test-3")) | 472 | (file-3 (make-temp-file "global-auto-revert-test-3")) |
| 473 | (file-2b (concat file-2 "-b")) | 473 | (file-2b (concat file-2 "-b")) |
| 474 | buf-1 buf-2 buf-3) | 474 | require-final-newline buf-1 buf-2 buf-3) |
| 475 | (unwind-protect | 475 | (unwind-protect |
| 476 | (progn | 476 | (progn |
| 477 | (setq buf-1 (find-file-noselect file-1)) | 477 | (setq buf-1 (find-file-noselect file-1)) |
| @@ -503,7 +503,7 @@ This expects `auto-revert--messages' to be bound by | |||
| 503 | (auto-revert-test--wait-for | 503 | (auto-revert-test--wait-for |
| 504 | (lambda () (buffer-local-value | 504 | (lambda () (buffer-local-value |
| 505 | 'auto-revert-notify-watch-descriptor buf-3)) | 505 | 'auto-revert-notify-watch-descriptor buf-3)) |
| 506 | (+ auto-revert-interval 1)) | 506 | auto-revert--timeout) |
| 507 | (should (buffer-local-value | 507 | (should (buffer-local-value |
| 508 | 'auto-revert-notify-watch-descriptor buf-3)) | 508 | 'auto-revert-notify-watch-descriptor buf-3)) |
| 509 | (auto-revert-test--write-file "3-a" file-3) | 509 | (auto-revert-test--write-file "3-a" file-3) |
| @@ -515,8 +515,8 @@ This expects `auto-revert--messages' to be bound by | |||
| 515 | (sleep-for 0.5) | 515 | (sleep-for 0.5) |
| 516 | (should (equal (auto-revert-test--buffer-string buf-1) "1-a")) | 516 | (should (equal (auto-revert-test--buffer-string buf-1) "1-a")) |
| 517 | (auto-revert-test--write-file "1-b" file-1) | 517 | (auto-revert-test--write-file "1-b" file-1) |
| 518 | (auto-revert-test--wait-for-buffer-text buf-1 "1-b" | 518 | (auto-revert-test--wait-for-buffer-text |
| 519 | (+ auto-revert-interval 1)) | 519 | buf-1 "1-b" auto-revert--timeout) |
| 520 | (should (buffer-local-value | 520 | (should (buffer-local-value |
| 521 | 'auto-revert-notify-watch-descriptor buf-1)) | 521 | 'auto-revert-notify-watch-descriptor buf-1)) |
| 522 | 522 | ||
| @@ -525,8 +525,8 @@ This expects `auto-revert--messages' to be bound by | |||
| 525 | (write-file file-2b)) | 525 | (write-file file-2b)) |
| 526 | (should (equal (auto-revert-test--buffer-string buf-2) "2-a")) | 526 | (should (equal (auto-revert-test--buffer-string buf-2) "2-a")) |
| 527 | (auto-revert-test--write-file "2-b" file-2b) | 527 | (auto-revert-test--write-file "2-b" file-2b) |
| 528 | (auto-revert-test--wait-for-buffer-text buf-2 "2-b" | 528 | (auto-revert-test--wait-for-buffer-text |
| 529 | (+ auto-revert-interval 1)) | 529 | buf-2 "2-b" auto-revert--timeout) |
| 530 | (should (buffer-local-value | 530 | (should (buffer-local-value |
| 531 | 'auto-revert-notify-watch-descriptor buf-2))) | 531 | 'auto-revert-notify-watch-descriptor buf-2))) |
| 532 | 532 | ||
| @@ -550,7 +550,7 @@ This expects `auto-revert--messages' to be bound by | |||
| 550 | (let* ((auto-revert-use-notify t) | 550 | (let* ((auto-revert-use-notify t) |
| 551 | (file-1 (make-temp-file "auto-revert-test")) | 551 | (file-1 (make-temp-file "auto-revert-test")) |
| 552 | (file-2 (concat file-1 "-2")) | 552 | (file-2 (concat file-1 "-2")) |
| 553 | (buf nil)) | 553 | require-final-newline buf) |
| 554 | (unwind-protect | 554 | (unwind-protect |
| 555 | (progn | 555 | (progn |
| 556 | (setq buf (find-file-noselect file-1)) | 556 | (setq buf (find-file-noselect file-1)) |
| @@ -565,7 +565,7 @@ This expects `auto-revert--messages' to be bound by | |||
| 565 | 565 | ||
| 566 | (auto-revert-test--write-file "C" file-2) | 566 | (auto-revert-test--write-file "C" file-2) |
| 567 | (auto-revert-test--wait-for-buffer-text | 567 | (auto-revert-test--wait-for-buffer-text |
| 568 | buf "C" (+ auto-revert-interval 1)) | 568 | buf "C" auto-revert--timeout) |
| 569 | (should (equal (buffer-string) "C")))) | 569 | (should (equal (buffer-string) "C")))) |
| 570 | 570 | ||
| 571 | ;; Clean up. | 571 | ;; Clean up. |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index b9868ff6a87..c9ae4d8b139 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -4173,7 +4173,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4173 | (should (numberp (process-get proc 'remote-pid))) | 4173 | (should (numberp (process-get proc 'remote-pid))) |
| 4174 | (should (interrupt-process proc)) | 4174 | (should (interrupt-process proc)) |
| 4175 | ;; Let the process accept the interrupt. | 4175 | ;; Let the process accept the interrupt. |
| 4176 | (while (accept-process-output proc nil nil 0)) | 4176 | (with-timeout (10 (tramp--test-timeout-handler)) |
| 4177 | (while (accept-process-output proc nil nil 0))) | ||
| 4177 | (should-not (process-live-p proc)) | 4178 | (should-not (process-live-p proc)) |
| 4178 | ;; An interrupted process cannot be interrupted, again. | 4179 | ;; An interrupted process cannot be interrupted, again. |
| 4179 | (should-error (interrupt-process proc) :type 'error)) | 4180 | (should-error (interrupt-process proc) :type 'error)) |