       (let [peer-node-a (extensions/create sync :peer)
             peer-node-b (extensions/create sync :peer)
 
-            payload-node-a (extensions/create sync :payload)
-            payload-node-b (extensions/create sync :payload)
+            payload-node-a-1 (extensions/create sync :payload)
+            payload-node-b-1 (extensions/create sync :payload)
+
+            payload-node-a-2 (extensions/create sync :payload)
+            payload-node-b-2 (extensions/create sync :payload)
 
             sync-spy-a (chan 1)
             sync-spy-b (chan 1)
             ack-ch-spy (chan 2)
-            offer-ch-spy (chan 1)
+            offer-ch-spy (chan 10)
             status-spy (chan 2)
             
             catalog [{:onyx/name :in


        (>!! (:planning-ch-head coordinator) {:catalog catalog :workflow workflow})

        (<!! sync-spy-a)
        (<!! sync-spy-b)

        (testing "Both payloads are received"
          (let [payload-a (extensions/read-place sync payload-node-a)
                payload-b (extensions/read-place sync payload-node-b)]
            (is (not (nil? payload-a)))
            (is (not (nil? payload-b)))
            (is (not= payload-a payload-b))

(ns onyx.coordinator.multi-peer-test
  (:require [clojure.test :refer :all]
            [clojure.core.async :refer [chan tap alts!! >!! <!!]]
            [com.stuartsierra.component :as component]
            [datomic.api :as d]
            [onyx.coordinator.async :as async]
