We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
aleph.http-test/test-idle-timeout
1 parent ae3f589 commit d8e2dc8Copy full SHA for d8e2dc8
test/aleph/http_test.clj
@@ -541,7 +541,14 @@
541
(d/chain' (fn [_] (s/close! body))))
542
body))
543
544
+(defn init-to-string-conversion! []
545
+ (bs/to-string (doto (s/stream 1) (s/put! "x") s/close!)))
546
+
547
(deftest test-idle-timeout
548
+ ;; Required so that the conversion initialization doesn't count
549
+ ;; toward the idle timeout. See
550
+ ;; https://github.com/clj-commons/aleph/issues/626 for background.
551
+ (init-to-string-conversion!)
552
(let [url (str "http://localhost:" port)
553
echo-handler (fn [{:keys [body]}] {:body (bs/to-string body)})
554
slow-handler (fn [_] {:body (slow-stream)})]
0 commit comments