 (doseq [v-peer v-peers]
   (onyx.api/shutdown-peer v-peer))
 
-(let [expected (set (map (fn [x] {:n (inc x)}) (filter even? (range n-messages))))]
+(let [expected (set (map (fn [x] {:n (inc x)}) (filter even? (range 11 n-messages))))]
   (fact (set (butlast results)) => expected)
   (fact (last results) => :done))
 

(def flow-conditions
  [{:flow/from :in
    :flow/to [:inc]
    :flow/predicate :onyx.peer.flow-test/segment-even?
    :flow/doc "Emits segments to :inc if the segment's :n key is an even number."}])

(defn segment-even? [event {:keys [n]}]
  (even? n))

(def v-peers (onyx.api/start-peers! 1 peer-config))



(def env (onyx.api/start-env env-config))

(def n-messages 100)

(def batch-size 10)

(def echo 1000)

