 (ns onyx.peer.single-peer-test
-  (:require [clojure.core.async :refer [chan >!! <!! close!]]
+  (:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
             [midje.sweet :refer :all]
             [onyx.peer.task-lifecycle-extensions :as l-ext]
             [onyx.system :refer [onyx-development-env]]
+            [onyx.plugin.core-async]
             [onyx.api]))
 
 (def id (java.util.UUID/randomUUID))

 {:catalog catalog :workflow workflow
  :task-scheduler :onyx.task-scheduler/round-robin})

(comment
 (doseq [v-peer v-peers]
   (onyx.api/shutdown-peer v-peer))


(def in-chan (chan (inc n-messages)))

(def out-chan (chan (sliding-buffer (inc n-messages))))

(defmethod l-ext/inject-lifecycle-resources :in
  [_ _] {:core.async/in-chan in-chan})
