Skip to content

Commit

Permalink
Changing back to listener with longer deref timeout
Browse files Browse the repository at this point in the history
Because I think IMMUTANT-542 applies to listeners, too, i.e. a single
session receiving all messages.

My current theory is that dynamic destination creation racism is to
blame for IMMUTANT-542.
  • Loading branch information
jcrossley3 committed Mar 25, 2015
1 parent be9b43a commit 90f13e1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions integration-tests/test-clustering/integs/cluster_test.clj
Expand Up @@ -80,10 +80,15 @@
ctx2 (msg/context (assoc opts :port (http-port "server-two")))]
(let [q1 (msg/queue "/queue/cluster" :context ctx1)
q2 (msg/queue "/queue/cluster" :context ctx2)
c 10]
received (atom [])
p (promise)
c 100]
(msg/listen q2 (fn [m]
(mark "GOT:" m)
(swap! received conj m)
(when (= c (count @received))
(deliver p :done))))
(dotimes [i c]
(msg/publish q1 i))
(is (= (range c)
(repeatedly c
(comp (fn [m] (mark "GOT:" m) m)
(partial msg/receive q2))))))))
(deref p 60000 nil)
(is (= (range c) @received)))))

0 comments on commit 90f13e1

Please sign in to comment.