diff --git a/scalardb/src/scalardb/transfer.clj b/scalardb/src/scalardb/transfer.clj index ac20329..1e794fb 100644 --- a/scalardb/src/scalardb/transfer.clj +++ b/scalardb/src/scalardb/transfer.clj @@ -1,6 +1,6 @@ (ns scalardb.transfer (:require [clojure.core.reducers :as r] - [clojure.tools.logging :refer [warn]] + [clojure.tools.logging :refer [info warn]] [jepsen [client :as client] [checker :as checker] @@ -86,6 +86,7 @@ (defn- tx-transfer [tx from to amount] + (info "Transferring" amount "from" from "to" to "by tx" (.getId tx)) (let [fromResult (.get tx (prepare-get from)) toResult (.get tx (prepare-get to))] (->> (calc-new-balance fromResult (- amount)) diff --git a/scalardb/test/scalardb/transfer_test.clj b/scalardb/test/scalardb/transfer_test.clj index b750c60..ffff6fb 100644 --- a/scalardb/test/scalardb/transfer_test.clj +++ b/scalardb/test/scalardb/transfer_test.clj @@ -52,6 +52,7 @@ (def mock-transaction (reify DistributedTransaction + (^String getId [_] "dummy-tx-id") (^Optional get [_ ^Get g] (mock-get g)) (^void put [_ ^Put p] (mock-put p)) (^void commit [_] (swap! commit-count inc)))) @@ -65,6 +66,7 @@ (def mock-transaction-throws-exception (reify DistributedTransaction + (^String getId [_] "dummy-tx-id") (^Optional get [_ ^Get _] (throw (CrudException. "get failed" nil))) (^void put [_ ^Put _] (throw (CrudException. "put failed" nil))) (^void commit [_] (throw (CommitException. "commit failed" nil)))))