[
https://issues.apache.org/jira/browse/STORM-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196196#comment-15196196
]
ASF GitHub Bot commented on STORM-1232:
---------------------------------------
Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1108#discussion_r56236015
--- Diff: storm-core/test/clj/org/apache/storm/scheduler_test.clj ---
@@ -262,20 +262,15 @@
(deftest test-sort-slots
;; test supervisor2 has more free slots
- (is (= '(["supervisor2" 6700] ["supervisor1" 6700]
- ["supervisor2" 6701] ["supervisor1" 6701]
- ["supervisor2" 6702])
- (sort-slots [["supervisor1" 6700] ["supervisor1" 6701]
- ["supervisor2" 6700] ["supervisor2" 6701]
["supervisor2" 6702]
- ])))
+ (is (= "[supervisor2:6700, supervisor1:6700, supervisor2:6701,
supervisor1:6701, supervisor2:6702]"
+ (.toString (EvenScheduler/sortSlots [(WorkerSlot. "supervisor1"
6700) (WorkerSlot. "supervisor1" 6701)
+ (WorkerSlot. "supervisor2" 6700) (WorkerSlot.
"supervisor2" 6701) (WorkerSlot. "supervisor2" 6702)
+ ]))))
;; test supervisor3 has more free slots
- (is (= '(["supervisor3" 6700] ["supervisor2" 6700] ["supervisor1" 6700]
- ["supervisor3" 6703] ["supervisor2" 6701] ["supervisor1" 6701]
- ["supervisor3" 6702] ["supervisor2" 6702]
- ["supervisor3" 6701])
- (sort-slots [["supervisor1" 6700] ["supervisor1" 6701]
- ["supervisor2" 6700] ["supervisor2" 6701]
["supervisor2" 6702]
- ["supervisor3" 6700] ["supervisor3" 6703]
["supervisor3" 6702] ["supervisor3" 6701]
- ])))
+ (is (= "[supervisor3:6700, supervisor2:6700, supervisor1:6700,
supervisor3:6701, supervisor2:6701, supervisor1:6701, supervisor3:6702,
supervisor2:6702, supervisor3:6703]"
--- End diff --
Same here toString is not ideal for testing. It can change way too
frequently and is meant to be user consumable not machine consumable.
> port backtype.storm.scheduler.DefaultScheduler to java
> -------------------------------------------------------
>
> Key: STORM-1232
> URL: https://issues.apache.org/jira/browse/STORM-1232
> Project: Apache Storm
> Issue Type: New Feature
> Components: storm-core
> Reporter: Robert Joseph Evans
> Assignee: Xin Wang
> Labels: java-migration, jstorm-merger
>
> port the DefaultScheduler to java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)