diff --git a/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj b/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj index eecb72559..2e1c802ac 100644 --- a/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj +++ b/hystrix-contrib/hystrix-clj/src/main/clojure/com/netflix/hystrix/core.clj @@ -391,7 +391,7 @@ " {:arglists '([name doc-string? attr-map? [params*] & body])} [name & opts] - (let [command-key (str name) + (let [command-key (str *ns* "/" name ) group-key (str *ns*) [m [params & body]] (split-def-meta opts) m (if-not (contains? m :arglists) diff --git a/hystrix-contrib/hystrix-clj/src/test/clojure/com/netflix/hystrix/core_test.clj b/hystrix-contrib/hystrix-clj/src/test/clojure/com/netflix/hystrix/core_test.clj index 262b47219..132664fa7 100644 --- a/hystrix-contrib/hystrix-clj/src/test/clojure/com/netflix/hystrix/core_test.clj +++ b/hystrix-contrib/hystrix-clj/src/test/clojure/com/netflix/hystrix/core_test.clj @@ -306,7 +306,7 @@ (testing "defines a fn in a var" (is (fn? my-fn-command)) (is (map? hm)) - (is (= "my-fn-command" (.name (:command-key hm)))) + (is (= "com.netflix.hystrix.core-test/my-fn-command" (.name (:command-key hm)))) (is (= "com.netflix.hystrix.core-test" (.name (:group-key hm)))) (is (= :data (-> #'my-fn-command meta :meta))) (= 500 ((:fallback-fn hm))))