Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.

Commit 7277449

Browse files
author
Trevor Bernard
committed
Modify tests to use doto instead of threading
1 parent 7027030 commit 7277449

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/zeromq/zmq_test.clj

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
(defonce context (zmq/zcontext))
77

88
(deftest push-pull-test
9-
(with-open [push (-> (zmq/socket context :push)
10-
(zmq/connect "tcp://127.0.0.1:12349"))
11-
pull (-> (zmq/socket context :pull)
12-
(zmq/bind "tcp://*:12349"))]
9+
(with-open [push (doto (zmq/socket context :push)
10+
(zmq/connect "tcp://127.0.0.1:12349"))
11+
pull (doto (zmq/socket context :pull)
12+
(zmq/bind "tcp://*:12349"))]
1313
(s/send "hello" push 0)
1414
(let [actual (String. (zmq/receive pull))]
1515
(is (= "hello" actual)))))
1616

1717

1818
(deftest receive-str-timeout-test
19-
(with-open [pull (-> (zmq/socket context :pull)
20-
(zmq/bind "tcp://*:12310"))]
21-
(zmq/set-receive-timeout pull 100)
19+
(with-open [pull (doto (zmq/socket context :pull)
20+
(zmq/set-receive-timeout 100)
21+
(zmq/bind "tcp://*:12310"))]
2222
(let [actual (zmq/receive-str pull)]
2323
(is (= nil actual)))))

0 commit comments

Comments
 (0)