Skip to content

Commit 6aaf086

Browse files
Simplify test (go blocks return channels)
1 parent 58139e1 commit 6aaf086

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/lsp4clj/server_test.clj

+2-6
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,10 @@
488488
(testing "current thread"
489489
(is (not (core-async-dispatch-thread? (Thread/currentThread)))))
490490
(testing "thread running go blocks"
491-
(let [ch (async/chan)
492-
_ (async/go (async/>! ch (Thread/currentThread)))
493-
thread (async/<!! ch)]
491+
(let [thread (async/<!! (async/go (Thread/currentThread)))]
494492
(is (core-async-dispatch-thread? thread))))
495493
(testing "thread running core.async thread macro"
496-
(let [ch (async/chan)
497-
_ (async/thread (async/>!! ch (Thread/currentThread)))
498-
thread (async/<!! ch)]
494+
(let [thread (async/<!! (async/thread (Thread/currentThread)))]
499495
(is (not (core-async-dispatch-thread? thread))))))
500496

501497
(deftest request-should-complete-on-a-suitable-executor

0 commit comments

Comments
 (0)