Skip to content

Commit d1de95c

Browse files
committed
Remove unreleased tests from clj-http client-test
1 parent 0254c6e commit d1de95c

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

test/aleph/http/clj_http/client_test.clj

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
[ring.util.codec :refer [form-decode-str]]
1414
[slingshot.slingshot :refer [try+]])
1515
(:import java.io.ByteArrayInputStream
16-
java.io.PipedInputStream
17-
java.io.PipedOutputStream
1816
java.net.UnknownHostException
1917
org.apache.http.HttpEntity
2018
org.apache.logging.log4j.LogManager))
@@ -28,13 +26,6 @@
2826
:server-name "localhost"
2927
:server-port 18080})
3028

31-
#_
32-
(defn request
33-
([req]
34-
(client/request (merge base-req req)))
35-
([req respond raise]
36-
(client/request (merge base-req req) respond raise)))
37-
3829
(defn parse-form-params [s]
3930
(->> (str/split (form-decode-str s) #"&")
4031
(map #(str/split % #"="))
@@ -1760,36 +1751,3 @@
17601751
(is (= (.getMessage e)
17611752
(str "only :flatten-nested-keys or :ignore-nested-query-string/"
17621753
":flatten-nested-keys may be specified, not both"))))))
1763-
1764-
(defn transit-resp [body]
1765-
{:body body
1766-
:status 200
1767-
:headers {"content-type" "application/transit-json"}})
1768-
1769-
(deftest issue-609-empty-transit-response
1770-
(testing "Body is available right away"
1771-
(is (= {:foo "bar"}
1772-
(:body (client/coerce-response-body
1773-
{:as :transit+json}
1774-
(transit-resp (ByteArrayInputStream.
1775-
(.getBytes "[\"^ \",\"~:foo\",\"bar\"]"))))))))
1776-
1777-
(testing "Empty body is read as nil"
1778-
(is (nil? (:body (client/coerce-response-body
1779-
{:as :transit+json}
1780-
(transit-resp (ByteArrayInputStream. (.getBytes ""))))))))
1781-
1782-
(testing "Body is read correctly even if the data becomes available later"
1783-
;; Ensure both streams are closed (normally done inside future).
1784-
(with-open [o (PipedOutputStream.)
1785-
i (PipedInputStream.)]
1786-
(.connect i o)
1787-
(future
1788-
(Thread/sleep 10)
1789-
(.write o (.getBytes "[\"^ \",\"~:foo\",\"bar\"]"))
1790-
;; Close right now, with-open will wait until test is done.
1791-
(.close o))
1792-
(is (= {:foo "bar"}
1793-
(:body (client/coerce-response-body
1794-
{:as :transit+json}
1795-
(transit-resp i))))))))

0 commit comments

Comments
 (0)