[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 1.2 4550c08 077/101: Re-enable eclipse-jdt tests
From: |
Christian Johansson |
Subject: |
[elpa] 1.2 4550c08 077/101: Re-enable eclipse-jdt tests |
Date: |
Thu, 29 Apr 2021 15:09:04 -0400 (EDT) |
tag: 1.2
commit 4550c0867b76707061c5800a91f262966b538bc2
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Re-enable eclipse-jdt tests
* eglot-tests.el (eglot--have-eclipse-jdt-ls-p): Reenable.
(eclipse-connect, eclipse-workspace-folders): Don't eglot-shutdown
explicitly. Fix indentation.
(eglot--call-with-fixture): Increase shutdown timeout to 10
seconds.
---
eglot-tests.el | 69 ++++++++++++++++++++++++++++------------------------------
1 file changed, 33 insertions(+), 36 deletions(-)
diff --git a/eglot-tests.el b/eglot-tests.el
index 306614b..7bd457b 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -33,8 +33,7 @@
;; Helpers
(defun eglot--have-eclipse-jdt-ls-p ()
- (and nil
- (getenv "CLASSPATH")
+ (and (getenv "CLASSPATH")
(cl-some
(lambda (x)
(string-match-p "org\\.eclipse\\.equinox\\.launcher_.*\\.jar$" x))
@@ -93,7 +92,7 @@ then restored."
(let ((eglot-autoreconnect nil))
(mapc (lambda (server)
(eglot-shutdown
- server nil nil (not cleanup-events-et-cetera-p)))
+ server nil 10 (not cleanup-events-et-cetera-p)))
(cl-remove-if-not #'jsonrpc-running-p new-servers)))
(setq buffers-to-delete
(delete nil (mapcar #'find-buffer-visiting created-files)))
@@ -230,44 +229,42 @@ Pass TIMEOUT to `eglot--with-timeout'."
"Connect to eclipse.jdt.ls server."
(skip-unless (eglot--have-eclipse-jdt-ls-p))
(eglot--with-fixture
- '(("project/src/main/java/foo" . (("Main.java" . "")))
- ("project/.git/" . nil))
- (with-current-buffer
- (eglot--find-file-noselect "project/src/main/java/foo/Main.java")
- (eglot--sniffing (:server-notifications s-notifs)
- (should (eglot--tests-connect 10))
- (eglot--wait-for (s-notifs 10)
- (&key _id method &allow-other-keys)
- (string= method "language/status"))
- (ignore-errors (eglot-shutdown (eglot--current-server) nil 10))))))
+ '(("project/src/main/java/foo" . (("Main.java" . "")))
+ ("project/.git/" . nil))
+ (with-current-buffer
+ (eglot--find-file-noselect "project/src/main/java/foo/Main.java")
+ (eglot--sniffing (:server-notifications s-notifs)
+ (should (eglot--tests-connect 10))
+ (eglot--wait-for (s-notifs 10)
+ (&key _id method &allow-other-keys)
+ (string= method "language/status"))))))
(ert-deftest eclipse-workspace-folders ()
"Check eclipse connection with multi-root projects."
(skip-unless (eglot--have-eclipse-jdt-ls-p))
(eglot--with-fixture
- '(("project/main/src/main/java/foo" . (("Main.java" . "")))
- ("project/sub1/" . (("pom.xml" . "")))
- ("project/sub2/" . (("build.gradle" . "")))
- ("project/sub3/" . (("a.txt" . "")))
- ("project/.git/" . nil))
- (let ((root (file-name-as-directory default-directory)))
- (with-current-buffer
- (eglot--find-file-noselect "project/main/src/main/java/foo/Main.java")
- (eglot--sniffing (:client-requests c-reqs)
- (should (eglot--tests-connect 10))
- (eglot--wait-for (c-reqs 10)
- (&key _id method params &allow-other-keys)
- (when (string= method "initialize")
- (let ((folders (plist-get
- (plist-get params :initializationOptions)
- :workspaceFolders))
- (default-directory root))
- (and
- (seq-contains folders (eglot--path-to-uri "project/"))
- (seq-contains folders (eglot--path-to-uri "project/sub1/"))
- (seq-contains folders (eglot--path-to-uri "project/sub2/"))
- (= 3 (length folders))))))
- (ignore-errors (eglot-shutdown (eglot--current-server) nil 10)))))))
+ '(("project/main/src/main/java/foo" . (("Main.java" . "")))
+ ("project/sub1/" . (("pom.xml" . "")))
+ ("project/sub2/" . (("build.gradle" . "")))
+ ("project/sub3/" . (("a.txt" . "")))
+ ("project/.git/" . nil))
+ (let ((root (file-name-as-directory default-directory)))
+ (with-current-buffer
+ (eglot--find-file-noselect
"project/main/src/main/java/foo/Main.java")
+ (eglot--sniffing (:client-requests c-reqs)
+ (should (eglot--tests-connect 10))
+ (eglot--wait-for (c-reqs 10)
+ (&key _id method params &allow-other-keys)
+ (when (string= method "initialize")
+ (let ((folders (plist-get
+ (plist-get params :initializationOptions)
+ :workspaceFolders))
+ (default-directory root))
+ (and
+ (seq-contains folders (eglot--path-to-uri "project/"))
+ (seq-contains folders (eglot--path-to-uri "project/sub1/"))
+ (seq-contains folders (eglot--path-to-uri "project/sub2/"))
+ (= 3 (length folders)))))))))))
(ert-deftest auto-detect-running-server ()
"Visit a file and M-x eglot, then visit a neighbour. "
- [elpa] 1.2 ea2fcc7 087/101: * eglot-tests.el (eclipse-connect): Increase connect timeout to 20., (continued)
- [elpa] 1.2 ea2fcc7 087/101: * eglot-tests.el (eclipse-connect): Increase connect timeout to 20., Christian Johansson, 2021/04/29
- [elpa] 1.2 7f1a0e3 100/101: * eglot.el (eglot-completion-at-point): Less chatter., Christian Johansson, 2021/04/29
- [elpa] 1.2 477e15d 018/101: * eglot.el (eglot-initialization-options): Fix spurious typo., Christian Johansson, 2021/04/29
- [elpa] 1.2 802dea3 033/101: Close #41: Control the size of the events buffer, Christian Johansson, 2021/04/29
- [elpa] 1.2 8ed2524 038/101: Close #50: Support snippet completions, Christian Johansson, 2021/04/29
- [elpa] 1.2 7583849 058/101: eglot-ignored-server-capabilites: Prefer all choices over "Other", Christian Johansson, 2021/04/29
- [elpa] 1.2 240f88c 050/101: Don't warn on implementation-specific notifications (#93), Christian Johansson, 2021/04/29
- [elpa] 1.2 ba9877f 048/101: Close #86: Handle case when :textDocumentSync isn't a number, Christian Johansson, 2021/04/29
- [elpa] 1.2 6788dbc 074/101: Don't ignore unknown SymbolKinds in imenu, Christian Johansson, 2021/04/29
- [elpa] 1.2 9bf41be 076/101: Larger margin for printing test failure backtraces, Christian Johansson, 2021/04/29
- [elpa] 1.2 4550c08 077/101: Re-enable eclipse-jdt tests,
Christian Johansson <=
- [elpa] 1.2 e866ca5 079/101: Use the container name of a symbol in imenu, Christian Johansson, 2021/04/29
- [elpa] 1.2 065f71a 080/101: Add support for code action literals, Christian Johansson, 2021/04/29
- [elpa] 1.2 7f8465c 025/101: Add a generic eglot-execute-command API, Christian Johansson, 2021/04/29
- [elpa] 1.2 d0ec044 041/101: Add go-langserver (#74), Christian Johansson, 2021/04/29
- [elpa] 1.2 6cbfdda 057/101: Make eglot-ignored-server-capabilites more user-friendly (#126), Christian Johansson, 2021/04/29
- [elpa] 1.2 d54e494 046/101: Ignore extra keys in textDocument/publishDiagnostics (#81), Christian Johansson, 2021/04/29
- [elpa] 1.2 2d3c391 007/101: Close #48: be less verbose when using eglot-ensure, Christian Johansson, 2021/04/29
- [elpa] 1.2 9c2fd8c 002/101: Close #44: Robustify in the face of manual mode changes, Christian Johansson, 2021/04/29
- [elpa] 1.2 4d80eeb 015/101: Default eglot-handle-notifictiona|request must &allow-other-keys, Christian Johansson, 2021/04/29
- [elpa] 1.2 d2faf6d 001/101: Close #29: Implement workspace/didChangeConfiguration (#40), Christian Johansson, 2021/04/29