(ns demo.messaging-test
  (:use clojure.test
        immutant.messaging))

(if (immutant.util/in-immutant?)
  (deftest ^:integration listening
    (start "test.topic")
    (let [expected (promise)
          handler (listen "test.topic" #(deliver expected %))]
      (try
        (publish "test.topic" :success)
        (is (= :success (deref expected 500 :fail)))
        (finally
          @(unlisten handler)
          (stop "test.topic"))))))

(ns demo.messaging-test
  (:use clojure.test
        immutant.messaging))

(when (immutant.util/in-immutant?)
  (deftest ^:integration listening
    (start "test.topic")
    (let [expected (promise)
          handler (listen "test.topic" #(deliver expected %))]
      (try
        (publish "test.topic" :success)
        (is (= :success (deref expected 1000 :fail)))
        (finally
          @(unlisten handler)
          (stop "test.topic"))))))

Allow for the possibility of more than one test
Allow for the possibility of more than one test

coopsource/feature-demo,immutant/feature-demo,immutant/feature-demo,immutant/feature-demo,FalseProtagonist/graphagora,coopsource/feature-demo,jkutner/feature-demo,jkutner/feature-demo,FalseProtagonist/graphagora,coopsource/feature-demo,jkutner/feature-demo,FalseProtagonist/graphagora