File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 22 org.clojure/core.async {:mvn/version " 1.5.648" }
33 camel-snake-kebab/camel-snake-kebab {:mvn/version " 0.4.3" }
44 cheshire/cheshire {:mvn/version " 5.11.0" }
5- funcool/promesa {:mvn/version " 10.0.571 " }}
5+ funcool/promesa {:mvn/version " 10.0.594 " }}
66 :paths [" src" " resources" ]
77 :aliases {:test {:extra-deps {lambdaisland/kaocha {:mvn/version " 1.64.1010" }}
88 :extra-paths [" test" ]
Original file line number Diff line number Diff line change 3838 (deref [_ timeout-ms timeout-val]
3939 (deref p timeout-ms timeout-val))
4040 IBlockingDerefOrCancel
41- (deref-or-cancel [this timeout-ms timeout-val]
41+ (deref-or-cancel [_ timeout-ms timeout-val]
4242 (let [result (deref p timeout-ms ::timeout )]
4343 (if (identical? ::timeout result)
44- (do (future- cancel this )
44+ (do (p/ cancel! p )
4545 timeout-val)
4646 result)))
4747 clojure.lang.IPending
Original file line number Diff line number Diff line change 385385 _ (server/start server nil )
386386 req (p/promise (server/send-request server " req" {:body " foo" }))
387387 client-rcvd-msg (h/assert-take output-ch)]
388- (async/put! input-ch (lsp.responses/response (:id client-rcvd-msg) {:processed 1 }))
389- (is (= {:processed 2 } (-> req
390- (p/timeout 1000 :test-timeout )
391- (p/then #(update % :processed inc))
392- (p/extract ))))
388+ (async/put! input-ch (lsp.responses/response (:id client-rcvd-msg) {:result :processed
389+ :value 1 }))
390+ (is (= {:result :processed
391+ :value 2 }
392+ (-> req
393+ (p/timeout 1000 {:result :test-timeout
394+ :value 1 })
395+ (p/then #(update % :value inc))
396+ (deref ))))
393397 (is (p/done? req))
394398 (is (p/resolved? req))
395399 (is (not (p/rejected? req)))
You can’t perform that action at this time.
0 commit comments