 
 (def result-db (d/db (:conn log)))
 
-(deftest test-small-cluster-few-jobs
+#_(deftest test-small-cluster-few-jobs
   (testing "No tasks are left incomplete"
     (su/task-completeness result-db))
 


(def sim-uri (str "datomic:mem://" (d/squuid)))

(def sim-conn (reset-conn sim-uri))

(load-schema sim-conn "simulant/schema.edn")

(load-schema sim-conn "simulant/coordinator-sim.edn")

(def system (s/onyx-system {:sync :zookeeper :queue :hornetq :eviction-delay 500000}))


  (testing "All peers got a roughly even number of tasks assigned"
    (su/peer-fairness result-db n-peers n-jobs tasks-per-job)))


(let [query '[:find ?inst :where
              [_ :peer/status _ ?tx]
              [?tx :db/txInstant ?inst]]
      txs (sort (map first (d/q query (d/history result-db))))]
  
  (prn (map (fn [tx]
              (let [db (d/as-of result-db tx)]
                [(map first (d/q '[:find (count ?p) :where [?p :peer/status]] db)) tx]))
            txs)))

(alter-var-root #'system component/stop)

(run-tests 'onyx.coordinator.simulant-test)
