 
 (def results (take-segments! out-chan))
 
+(doseq [v-peer v-peers]
+  (onyx.api/shutdown-peer v-peer))
+
 (def out-val @output)
+
+(fact (not (empty? out-val)))
 
 ;;; Scan the key set, dropping any nils. Count the distinct keys.
 ;;; Do the same for the right hand side of the expression, but turn it into a set.

(>!! in-chan :done)
(close! in-chan)

(def v-peers (onyx.api/start-peers 3 peer-group))

(onyx.api/submit-job
 peer-config


(fact results => [:done])

(onyx.api/shutdown-peer-group peer-group)

(onyx.api/shutdown-env env)
