storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] git commit: fixed the validation logic in validate-launched-once.
Date Fri, 25 Jul 2014 21:25:37 GMT
Repository: incubator-storm
Updated Branches:
  refs/heads/master 5219f494e -> 556ac8af1


fixed the validation logic in validate-launched-once.


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/c78e08fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/c78e08fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/c78e08fe

Branch: refs/heads/master
Commit: c78e08feef7044d262c0ea30d202faee94c28862
Parents: 5b425e4
Author: iwasakims <iwasakims@example.com>
Authored: Wed Jul 16 06:30:35 2014 -0700
Committer: iwasakims <iwasakims@example.com>
Committed: Wed Jul 16 06:30:35 2014 -0700

----------------------------------------------------------------------
 storm-core/test/clj/backtype/storm/supervisor_test.clj | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/c78e08fe/storm-core/test/clj/backtype/storm/supervisor_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/supervisor_test.clj b/storm-core/test/clj/backtype/storm/supervisor_test.clj
index 1a27c1a..1bae991 100644
--- a/storm-core/test/clj/backtype/storm/supervisor_test.clj
+++ b/storm-core/test/clj/backtype/storm/supervisor_test.clj
@@ -60,10 +60,11 @@
 
 (defn validate-launched-once [launched supervisor->ports storm-id]
   (let [counts (map count (vals launched))
-        launched-supervisor->ports (apply merge-with concat
-                                     (for [[s p] (keys launched)]
-                                       {s [p]}
-                                       ))]
+        launched-supervisor->ports (apply merge-with set/union
+                                          (for [[[s p] sids] launched
+                                                :when (some #(= % storm-id) sids)]
+                                            {s #{p}}))
+        supervisor->ports (map-val set supervisor->ports)]
     (is (every? (partial = 1) counts))
     (is (= launched-supervisor->ports supervisor->ports))
     ))


Mime
View raw message