Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2149#discussion_r120122106
--- Diff:
storm-core/test/jvm/org/apache/storm/scheduler/resource/strategies/scheduling/TestDefaultResourceAwareStrategy.java
---
@@ -111,55 +112,23 @@ public void testDefaultResourceAwareStrategy() {
rs.prepare(conf);
rs.schedule(topologies, cluster);
- Map<String, List<String>> nodeToComps = new HashMap<String,
List<String>>();
- for (Map.Entry<ExecutorDetails, WorkerSlot> entry :
cluster.getAssignments().get("testTopology-id").getExecutorToSlot().entrySet())
{
- WorkerSlot ws = entry.getValue();
- ExecutorDetails exec = entry.getKey();
- if (!nodeToComps.containsKey(ws.getNodeId())) {
- nodeToComps.put(ws.getNodeId(), new LinkedList<String>());
- }
-
nodeToComps.get(ws.getNodeId()).add(topo.getExecutorToComponent().get(exec));
+ HashSet<HashSet<ExecutorDetails>> expectedScheduling = new
HashSet<>();
+ expectedScheduling.add(new HashSet<>(Arrays.asList(new
ExecutorDetails(0, 0)))); //Spout
+ expectedScheduling.add(new HashSet<>(Arrays.asList(
+ new ExecutorDetails(2, 2), //bolt-1
+ new ExecutorDetails(4, 4), //bolt-2
+ new ExecutorDetails(6, 6)))); //bolt-3
+ expectedScheduling.add(new HashSet<>(Arrays.asList(
+ new ExecutorDetails(1, 1), //bolt-1
+ new ExecutorDetails(3, 3), //bolt-2
--- End diff --
The test is failing with 3, 3 switched with 4, 4. I am not sure what
caused the switch. Both are valid scheduling so I am inclined to just have you
make the change here in the test to let it pass.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---