 
 (defn add-test-env-peers! 
   "Add peers to an OnyxTestEnv component"
-  [{:keys [peer-group peers] :as component} n-peers]
-  (swap! peers into (try-start-peers n-peers peer-group)))
+  [{:keys [peer-group peers monitoring-config] :as component} n-peers]
+  (swap! peers into (try-start-peers n-peers peer-group monitoring-config)))
 
 (defn shutdown-peer [v-peer]
   (try

    (println "Starting Onyx test environment")
    (let [env (try-start-env env-config)
          peer-group (try-start-group peer-config monitoring-config)
          peers (try-start-peers n-peers peer-group)]
      (assoc component :env env :peer-group peer-group :peers (atom peers))))

  (stop [component]

  (try
    (let [m-cfg (or monitoring-config {:monitoring :no-op})]
      (onyx.api/start-peer-group peer-config m-cfg))
    (catch InterruptedException e)
    (catch Throwable e
      (throw e))))

(defn try-start-peers [n-peers peer-group monitoring-config]
  (try
    (onyx.api/start-peers n-peers peer-group (or monitoring-config {:monitoring :custom}))
    (catch InterruptedException e)
