    [taoensso.timbre :refer [trace debug info warn error]]
    [deferst :refer [defsystem]]
    [deferst.system :as sys]
+   [deferst]
    [slf4j-timbre.configure :as logconf]
    [manifold.stream :as stream]
    [er-cassandra.record :as r]

  (fn [f]

    (let [sb (sys/system-builder alia-test-model-session-system-def)
          sys (sys/start-system! sb alia-test-model-session-config)]
      (try
        (with-system sys)
        (finally
          (try
            @(sys/stop-system! sys)
            (catch Exception e
              (error e "error during test stop-system!"))))))))

(defn create-table
  "creates a table for test - drops any existing version of the table first"

            {:keyspace "er_cassandra_test"
             ;; set to false to preserve db contents after tests
             :truncate-on-close true
             ;; :trace? :warn
             ;; :consistency :all
             }}})

