We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b467750 commit a39add8Copy full SHA for a39add8
test/clj/backtype/storm/nimbus_test.clj
@@ -108,6 +108,11 @@
108
(is (= dist (multi-set distribution)))
109
))
110
111
+(defn disjoint? [& sets]
112
+ (let [combined (apply concat sets)]
113
+ (= (count combined) (count (set combined)))
114
+ ))
115
+
116
(defnk check-consistency [cluster storm-name :assigned? true]
117
(let [state (:storm-cluster-state cluster)
118
storm-id (get-storm-id state storm-name)
@@ -217,6 +222,8 @@
217
222
(is (= {2 3} (topology-node-distribution state "tester1")))
218
223
(is (= {3 2} (topology-node-distribution state "tester2")))
219
224
225
+ (is (apply disjoint? (map (partial topology-nodes state) ["noniso" "tester1" "tester2"])))
226
220
227
(check-consistency cluster "tester1")
221
228
(check-consistency cluster "tester2")
229
(check-consistency cluster "noniso")
0 commit comments