branch: externals/urgrep
commit 56acdfe4343d466b889f197c15ba214d3f03c09d
Author: Jim Porter <jporterb...@gmail.com>
Commit: Jim Porter <jporterb...@gmail.com>

    Improve how we wait for urgrep to finish in tests
---
 urgrep-tests.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/urgrep-tests.el b/urgrep-tests.el
index b9460c643d..3b83a6c770 100644
--- a/urgrep-tests.el
+++ b/urgrep-tests.el
@@ -523,7 +523,8 @@
                (local-variable-p 'urgrep-current-tool)))
   (should (and (equal urgrep-current-query '("urgrep"))
                (local-variable-p 'urgrep-current-query)))
-  (sit-for 1)
+  (while (get-buffer-process (current-buffer))
+    (sit-for 0.01))
   (goto-char (point-min))
   (re-search-forward "urgrep-tests.el")
   (beginning-of-line 2)
@@ -535,7 +536,8 @@
                (local-variable-p 'urgrep-current-tool)))
   (should (and (equal urgrep-current-query '("urgrep" :group nil))
                (local-variable-p 'urgrep-current-query)))
-  (sit-for 1)
+  (while (get-buffer-process (current-buffer))
+    (sit-for 0.01))
   (goto-char (point-min))
   (re-search-forward "urgrep-tests.el:")
   (urgrep-tests--check-match-at-point))
@@ -546,7 +548,8 @@
                (local-variable-p 'urgrep-current-tool)))
   (should (and (equal urgrep-current-query (urgrep-command "urgrep"))
                (local-variable-p 'urgrep-current-query)))
-  (sit-for 1)
+  (while (get-buffer-process (current-buffer))
+    (sit-for 0.01))
   (goto-char (point-min))
   (re-search-forward "urgrep-tests.el")
   (beginning-of-line 2)

Reply via email to