]> git.eshelyaron.com Git - emacs.git/commitdiff
Eglot: make eglot-test-javascript-basic more robust
authorJoão Távora <joaotavora@gmail.com>
Mon, 20 Jan 2025 17:42:59 +0000 (17:42 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 Jan 2025 10:23:06 +0000 (11:23 +0100)
* test/lisp/progmodes/eglot-tests.el
(eglot-test-javascript-basic): Mark test expensive and increase timeout.

(cherry picked from commit a1ce633ca9be91c4acba4125cdabc5b6f600e5ff)

test/lisp/progmodes/eglot-tests.el

index 10e8fb1d41b28f2d2306cbac632e5fe7094fa642..2dc45df7d9e6c4447c4bdfe0e6e1c4f48ca46dad 100644 (file)
@@ -866,6 +866,7 @@ int main() {
 
 (ert-deftest eglot-test-javascript-basic ()
   "Test basic autocompletion in a JavaScript LSP."
+  :tags '(:expensive-test)
   (skip-unless (and (executable-find "typescript-language-server")
                     (executable-find "tsserver")))
   (eglot--with-fixture
@@ -880,14 +881,14 @@ int main() {
                           :client-notifications
                           c-notifs)
           (should (eglot--tests-connect))
-          (eglot--wait-for (s-notifs 2) (&key method &allow-other-keys)
+          (eglot--wait-for (s-notifs 10) (&key method &allow-other-keys)
             (string= method "textDocument/publishDiagnostics"))
           (should (not (eq 'flymake-error (face-at-point))))
           (insert "{")
           (eglot--signal-textDocument/didChange)
           (eglot--wait-for (c-notifs 1) (&key method &allow-other-keys)
             (string= method "textDocument/didChange"))
-          (eglot--wait-for (s-notifs 2) (&key params method &allow-other-keys)
+          (eglot--wait-for (s-notifs 10) (&key params method &allow-other-keys)
             (and (string= method "textDocument/publishDiagnostics")
                  (cl-destructuring-bind (&key _uri diagnostics) params
                    (cl-find-if (jsonrpc-lambda (&key severity &allow-other-keys)