[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/plz 4736d5242a 66/81: Tests: (plz-test-wait) Change to
From: |
ELPA Syncer |
Subject: |
[elpa] externals/plz 4736d5242a 66/81: Tests: (plz-test-wait) Change to function, test process argument |
Date: |
Wed, 11 May 2022 17:58:03 -0400 (EDT) |
branch: externals/plz
commit 4736d5242ab5b2e40ca5d50d9c8380e2ee0d49b1
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Tests: (plz-test-wait) Change to function, test process argument
I'm not sure if the recent changes I made caused a race condition of
some kind (whether in the library or just the tests), but this seems
to fix the tests that were failing, and it didn't need to be a macro,
anyway.
---
tests/test-plz.el | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tests/test-plz.el b/tests/test-plz.el
index 10812b06d9..6cc3f3397f 100644
--- a/tests/test-plz.el
+++ b/tests/test-plz.el
@@ -43,11 +43,18 @@
;;;; Macros
-(cl-defmacro plz-test-wait (process &optional (seconds 0.1) (times 100))
+(cl-defun plz-test-wait (process &optional (seconds 0.1) (times 100))
"Wait for SECONDS seconds TIMES times for PROCESS to finish."
- `(cl-loop for i upto ,times ;; 10 seconds
- while (equal 'run (process-status ,process))
- do (sleep-for ,seconds)))
+ (when process
+ ;; Sometimes it seems that the process is killed, the THEN
+ ;; function called by its sentinel, and its buffer killed, all
+ ;; before this function gets called with the process argument;
+ ;; when that happens, tests that use this can fail. Testing
+ ;; whether PROCESS is non-nil seems to fix it, but it's possible
+ ;; that something funny is going on...
+ (cl-loop for i upto times ;; 10 seconds
+ while (equal 'run (process-status process))
+ do (sleep-for seconds))))
;;;; Functions
- [elpa] externals/plz 7c27e4bdcd 61/81: Change: Sync with accept-process-output, (continued)
- [elpa] externals/plz 7c27e4bdcd 61/81: Change: Sync with accept-process-output, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 65030d5cc1 64/81: Tidy: Docstring, ELPA Syncer, 2022/05/11
- [elpa] externals/plz dd92f48895 65/81: Change: Default to :then 'sync and :as 'string, ELPA Syncer, 2022/05/11
- [elpa] externals/plz cddccccf81 67/81: Docs: Fix link, ELPA Syncer, 2022/05/11
- [elpa] externals/plz f1a89a8816 68/81: Add: Download :as file, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 8cd1ef481d 73/81: Notes: Add links to skeeto's feedback, ELPA Syncer, 2022/05/11
- [elpa] externals/plz dd491941ab 79/81: Meta: Update makem.sh, ELPA Syncer, 2022/05/11
- [elpa] externals/plz da503527d2 76/81: Change: (plz--response) Error if unable to parse HTTP response, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 0a860d94dc 71/81: Tests: "There be dragons.", ELPA Syncer, 2022/05/11
- [elpa] externals/plz ce7afc17f9 63/81: Meta: Ignore .sandbox/, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 4736d5242a 66/81: Tests: (plz-test-wait) Change to function, test process argument,
ELPA Syncer <=