Details
-
Sub-task
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Conversion of capacities are incorrect if the total doesn't add up exactly to 100.00%.
The loop invariant must be fixed:
for (int i = 0; i < children.size() - 2; i++) {
The testcase needs to be fixed too:
assertEquals("root.default capacity", "33.333", csConfig.get(PREFIX + "root.default.capacity")); assertEquals("root.admins capacity", "33.333", csConfig.get(PREFIX + "root.admins.capacity")); assertEquals("root.users capacity", "66.667", csConfig.get(PREFIX + "root.users.capacity"));