Skip to content

Commit d8e2dc8

Browse files
committed
Stabilize aleph.http-test/test-idle-timeout
Fixes #626.
1 parent ae3f589 commit d8e2dc8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/aleph/http_test.clj

+7
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,14 @@
541541
(d/chain' (fn [_] (s/close! body))))
542542
body))
543543

544+
(defn init-to-string-conversion! []
545+
(bs/to-string (doto (s/stream 1) (s/put! "x") s/close!)))
546+
544547
(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!)
545552
(let [url (str "http://localhost:" port)
546553
echo-handler (fn [{:keys [body]}] {:body (bs/to-string body)})
547554
slow-handler (fn [_] {:body (slow-stream)})]

0 commit comments

Comments
 (0)