   (let [k1   (test-key "stress-data")
         k2   (test-key "stress-data-hash")
         data (dissoc nippy/stress-data :bytes)]
-    (wc (r/set k1 data))
-    (is (= data (wc (r/get k1))))
-
-    (wc (r/hmset k2 "field1" data "field2" "just a string"))
-    (is (= data (wc (r/hget k2 "field1"))))
-    (is (= "just a string" (wc (r/hget k2 "field2"))))))
+    (wcar (car/set k1 data))
+    (is (= data (wcar (car/get k1))))
+
+    (wcar (car/hmset k2 "field1" data "field2" "just a string"))
+    (is (= data (wcar (car/hget k2 "field1"))))
+    (is (= "just a string" (wcar (car/hget k2 "field2"))))))
 
 (deftest test-preserved-values
   (let [num-key      (test-key "num-key")
         preserve-key (test-key "preserve-key")]
-    (wc (r/set num-key 10)
-        (r/set preserve-key (r/preserve 10)))
-    (is (= (wc (r/get num-key))      "10"))
-    (is (= (wc (r/get preserve-key)) 10))))
+    (wcar (car/set num-key 10)
+          (car/set preserve-key (car/preserve 10)))
+    (is (= (wcar (car/get num-key))      "10"))
+    (is (= (wcar (car/get preserve-key)) 10))))
 
 (deftest test-binary-safety
   (let [k (test-key "binary-safety")
         ba (byte-array [(byte 3) (byte 1) (byte 4)])]
-    (wc (r/set k ba))
-    (is (= [ba 3]) (wc (r/get k)))))
+    (wcar (car/set k ba))
+    (is (= [ba 3]) (wcar (car/get k)))))
 
 (deftest test-nulls
   (let [k (test-key "nulls")]
-    (wc (r/set k nil))
-    (is (= nil (wc (r/get k))))
-    (wc (r/set k ""))
-    (is (= "" (wc (r/get k))))
-    (wc (r/set k " "))
-    (is (= " " (wc (r/get k))))
-    (wc (r/set k (byte-array 0)))
-    (is (= 0 (second (wc (r/get k)))))
-    (wc (r/set k (.getBytes "\u0000" "UTF-8")))
-    (is (= 1 (second (wc (r/get k)))))
-    (wc (r/set k "Foobar\u0000"))
-    (is (= "Foobar\u0000" (wc (r/get k))))
-    (is (thrown? Exception (wc (r/set k "\u0000Foobar"))))))
+    (wcar (car/set k nil))
+    (is (= nil (wcar (car/get k))))
+    (wcar (car/set k ""))
+    (is (= "" (wcar (car/get k))))
+    (wcar (car/set k " "))
+    (is (= " " (wcar (car/get k))))
+    (wcar (car/set k (byte-array 0)))
+    (is (= 0 (second (wcar (car/get k)))))
+    (wcar (car/set k (.getBytes "\u0000" "UTF-8")))
+    (is (= 1 (second (wcar (car/get k)))))
+    (wcar (car/set k "Foobar\u0000"))
+    (is (= "Foobar\u0000" (wcar (car/get k))))
+    (is (thrown? Exception (wcar (car/set k "\u0000Foobar"))))))
 
 (deftest test-big-responses
   (let [k (test-key "big-list")
         n 250000]
-    (wc (dorun (repeatedly n (fn [] (r/rpush k "value")))))
-    (is (= (repeat n "value") (wc (r/lrange k 0 -1))))))
+    (wcar (dorun (repeatedly n (fn [] (car/rpush k "value")))))
+    (is (= (repeat n "value") (wcar (car/lrange k 0 -1))))))
 
 (deftest test-lua
   (when (redis-version-sufficient? "2.6.0")
     (let [k (test-key "script")
           script "return redis.call('set',KEYS[1],'script-value')"
-          script-hash (r/hash-script script)]
-      (wc (r/script-load script))
-      (wc (r/evalsha script-hash 1 k))
-      (is (= "script-value" (wc (r/get k))))
+          script-hash (car/hash-script script)]
+      (wcar (car/script-load script))
+      (wcar (car/evalsha script-hash 1 k))
+      (is (= "script-value" (wcar (car/get k))))
       (is (= ["key1" "key2" "arg1" "arg2"]
-             (wc (r/eval "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}"
-                         2 "key1" "key2" "arg1" "arg2")))))))
+             (wcar (car/eval "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}"
+                             2 "key1" "key2" "arg1" "arg2")))))))
 
 (deftest test-reply-parsing
   (let [k (test-key "reply-parsing")]
-    (wc (r/set k [:a :A :b :B :c :C :d :D]))
+    (wcar (car/set k [:a :A :b :B :c :C :d :D]))
     (is (= ["PONG" {:a :A :b :B :c :C :d :D} "PONG" "PONG"]
-           (wc (r/ping)
-               (r/with-parser #(apply hash-map %) (r/get k))
-               (r/ping)
-               (r/ping))))))
+           (wcar (car/ping)
+                 (car/with-parser #(apply hash-map %) (car/get k))
+                 (car/ping)
+                 (car/ping))))))
 
 (deftest test-transactions
   (let [k      (test-key "atomic")

(ns test-carmine.main
  (:use [clojure.test])
  (:require [clojure.string         :as str]
            [taoensso.carmine       :as r]
            [taoensso.carmine.utils :as utils]
            [taoensso.nippy         :as nippy]))


        wk-val "initial-wk-value"]

    ;;; This transaction will succeed
    (wcar (car/set k  k-val)
          (car/set wk wk-val))
    (is (= ["PONG" "OK"]
           (wcar (car/atomically
                  []
                  (let [wk-val (wcar (car/get wk))]
                    (car/ping)
                    (car/set k wk-val))))))
    (is (= wk-val (wcar (car/get k))))

    ;;; This transaction will fail
    (wcar (car/set k  k-val)
          (car/set wk wk-val))
    (is (= []
           (wcar (car/atomically
                  [wk]
                  (wcar (car/set wk "CHANGE!")) ; Will break watch
                  (car/ping)))))
    (is (= k-val (wcar (car/get k))))))

(clean-up!) ; Leave with a fresh db