   (with-open [_ (msg/listen trigger listener)]
     (msg/publish trigger {:tx? true})
     (is (= "kiwi" (msg/receive queue :timeout 1000)))
-    (is (= "starfruit" (msg/receive remote-queue :timeout 1000)))
+    (is (= "starfruit" (msg/receive local-remote-queue :timeout 1000)))
     (is (= 1 (:a cache)))))
 
 (deftest transactional-writes-in-listener-should-fail-on-exception
   (with-open [_ (msg/listen trigger listener)]
     (msg/publish trigger {:tx? true :throw? true})
     (is (nil? (msg/receive queue :timeout 1000)))
-    (is (nil? (msg/receive remote-queue :timeout 1000)))
+    (is (nil? (msg/receive local-remote-queue :timeout 1000)))
     (is (nil? (:a cache)))
     (is (= 10 (:deliveries cache)))))
 

            [immutant.messaging :as msg]))

(def queue (msg/queue "/queue/test" :durable false))
(msg/queue "remote" :durable false)
(def conn (if (in-container?)
            (msg/connection :host "localhost" :port (messaging-remoting-port)
              :username "testuser" :password "testuser" :remote-type :hornetq-wildfly
              :xa true)
            (msg/connection :host "localhost" :xa true)))
(def remote-queue (msg/queue "remote" :connection conn))
(def trigger (msg/queue "/queue/trigger" :durable false))
(def cache (csh/cache "tx-test" :transactional true))


  (with-open [_ (msg/listen trigger listener :xa true)]
    (msg/publish trigger {:tx? true :rollback? true})
    (is (nil? (msg/receive queue :timeout 1000)))
    (is (nil? (msg/receive local-remote-queue :timeout 1000)))
    (is (nil? (:a cache)))
    (is (= 10 (:deliveries cache)))))

