Skip to content

Commit

Permalink
Add in-cluster test to confirm we can detect a cluster.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Aug 31, 2015
1 parent eb88887 commit 4c69884
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion integration-tests/src/integs/cluster.clj
Expand Up @@ -43,4 +43,5 @@
(s/schedule update-cache :singleton "cache-updater" :every 222)
(m/queue "/queue/cluster", :durable? false)
(w/run (-> #'counter wrap-session) :path "/counter")
(w/run (fn [_] (response (with-out-str (pr cache)))) :path "/cache"))
(w/run (fn [_] (response (with-out-str (pr cache)))) :path "/cache")
(w/run (fn [_] (response (with-out-str (pr (immutant.util/in-cluster?))))) :path "/in-cluster"))
4 changes: 4 additions & 0 deletions integration-tests/test-clustering/integs/cluster_test.clj
Expand Up @@ -43,6 +43,10 @@
~@body
(mark "FINISH" v#))))

(marktest in-cluster
(is (get-as-data "/in-cluster" "server-one"))
(is (get-as-data "/in-cluster" "server-two")))

(marktest bouncing-basic-web
(is (-> (get-as-data "/cache" "server-one") :count number?))
(is (-> (get-as-data "/cache" "server-two") :count number?))
Expand Down

0 comments on commit 4c69884

Please sign in to comment.