Skip to content

Commit a39add8

Browse files
author
Nathan Marz
committed
improve isolation scheduler test
1 parent b467750 commit a39add8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/clj/backtype/storm/nimbus_test.clj

+7
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@
108108
(is (= dist (multi-set distribution)))
109109
))
110110

111+
(defn disjoint? [& sets]
112+
(let [combined (apply concat sets)]
113+
(= (count combined) (count (set combined)))
114+
))
115+
111116
(defnk check-consistency [cluster storm-name :assigned? true]
112117
(let [state (:storm-cluster-state cluster)
113118
storm-id (get-storm-id state storm-name)
@@ -217,6 +222,8 @@
217222
(is (= {2 3} (topology-node-distribution state "tester1")))
218223
(is (= {3 2} (topology-node-distribution state "tester2")))
219224

225+
(is (apply disjoint? (map (partial topology-nodes state) ["noniso" "tester1" "tester2"])))
226+
220227
(check-consistency cluster "tester1")
221228
(check-consistency cluster "tester2")
222229
(check-consistency cluster "noniso")

0 commit comments

Comments
 (0)