-
Notifications
You must be signed in to change notification settings - Fork 6
add intellij integration test structure #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
afucher
commented
Mar 31, 2025
•
edited
Loading
edited
- Setup structure
- Add test workflow
- Implement one test case
|
action | ||
(com.intellij.openapi.actionSystem.AnActionEvent/createFromDataContext action-id nil context)))))) | ||
|
||
(defn wait-lsp-start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason using the same approach from clj4intellij with promises makes the test to hang forever 😢 So, we decided to create a specific function in this project to use a timeout instead of promise to wait.
src/test/clojure/com/github/clojure_lsp/intellij/test_utils.clj
Outdated
Show resolved
Hide resolved
src/test/clojure/com/github/clojure_lsp/intellij/slurp_action_test.clj
Outdated
Show resolved
Hide resolved
src/test/clojure/com/github/clojure_lsp/intellij/slurp_action_test.clj
Outdated
Show resolved
Hide resolved
:or {millis 1000 | ||
timeout 10000}}] | ||
(let [start-time (System/currentTimeMillis)] | ||
(loop [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clojure.core.async/alts! is perfect for those do or timeout task, but it's ok to keep it as it is