From cea20140af807cc8ea50ce3bcf48eac8f4e9b640 Mon Sep 17 00:00:00 2001 From: Rob Levy Date: Thu, 1 Mar 2012 15:39:40 -0500 Subject: [PATCH] unit test changed to new way of doing it --- test/clojure_hbase/core_test.clj | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/test/clojure_hbase/core_test.clj b/test/clojure_hbase/core_test.clj index 86fed8d..68ef750 100644 --- a/test/clojure_hbase/core_test.clj +++ b/test/clojure_hbase/core_test.clj @@ -117,24 +117,19 @@ :map-value #(Bytes/toString %))) "latest-as-map works."))))) -(defn- as-if-htable-first-run! - "create artificial conditions, as if htable-pool's first run" - [] - (swap! @#'clojure-hbase.core/*db* (fn [_] nil)) - (#'clojure-hbase.core/htable-pool)) +;;;;;;(#'clojure-hbase.core/htable-pool)) (deftest test-set-config (as-test (is - (try (set-config "hbase.zookeeper.quorum" "asdsa") ;<- not valid - (as-if-htable-first-run!) + (try (set-config + (make-config "hbase.zookeeper.quorum" "asdsa")) ;<- not valid (table test-tbl-name) ;<- should raise exception false #_"<- fail if we got here, it should have thrown" (catch Exception e true))) (is (do - (set-config "hbase.zookeeper.quorum" "127.0.0.1") ;<- valid - (as-if-htable-first-run!) - (list-tables) ;<- it'll be fine! - true)))) + (set-config + (make-config "hbase.zookeeper.quorum" "127.0.0.1")) ;<- valid + (table test-tbl-name)))))