Commit 87492a24 authored by Sebastien Robin's avatar Sebastien Robin

task distribution: allow to affect test suites up to 10 test nodes

parent f0270cb6
...@@ -769,7 +769,7 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -769,7 +769,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
# Now let's create a test suite needing between 1 to 2 test nodes # Now let's create a test suite needing between 1 to 2 test nodes
# Make sure additional work is added without moving other test suites # Make sure additional work is added without moving other test suites
self._createTestSuite(reference_correction=+3, self._createTestSuite(reference_correction=+3,
priority=4, title='four')[0].getRelativeUrl() priority=2, title='four')[0].getRelativeUrl()
check([test_node_zero, ["three", "four"]], check([test_node_zero, ["three", "four"]],
[test_node_one, ["two", "four"]], [test_node_one, ["two", "four"]],
[test_node_two, ["one"]]) [test_node_two, ["one"]])
...@@ -782,23 +782,23 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -782,23 +782,23 @@ class TestTaskDistribution(ERP5TypeTestCase):
[test_node_two, ["one", "five"]]) [test_node_two, ["one", "five"]])
# Now let's create another test suite needing between 2 to 3 test nodes # Now let's create another test suite needing between 2 to 3 test nodes
# and increase priority of one suite to make all test nodes almost satured # and increase priority of one suite to make all test nodes almost satured
test_suite_five.setIntIndex(7) test_suite_five.setIntIndex(3)
self._createTestSuite(reference_correction=+5, self._createTestSuite(reference_correction=+5,
priority=7, title='six') priority=3, title='six')
check([test_node_zero, ["three", "four","five", "six"]], check([test_node_zero, ["three", "four","five", "six"]],
[test_node_one, ["two", "four", "five", "six"]], [test_node_one, ["two", "four", "five", "six"]],
[test_node_two, ["one", "five", "six"]]) [test_node_two, ["one", "five", "six"]])
# Then, check what happens if all nodes are more than saturated # Then, check what happens if all nodes are more than saturated
# with a test suite needing between 3 to 5 test nodes # with a test suite needing between 3 to 5 test nodes
self._createTestSuite(reference_correction=+6, self._createTestSuite(reference_correction=+6,
priority=9, title='seven') priority=5, title='seven')
check([test_node_zero, ["three", "four", "five", "six"]], check([test_node_zero, ["three", "four", "five", "six"]],
[test_node_one, ["two", "four", "five", "six"]], [test_node_one, ["two", "four", "five", "six"]],
[test_node_two, ["one", "seven", "five", "six"]]) [test_node_two, ["one", "seven", "five", "six"]])
# No place any more, adding more test suite has no consequence # No place any more, adding more test suite has no consequence
# we need 5*2 + 3*2 + 2*1 + 1*3 => 21 slots # we need 5*2 + 3*2 + 2*1 + 1*3 => 21 slots
self._createTestSuite(reference_correction=+7, self._createTestSuite(reference_correction=+7,
priority=9, title='height') priority=5, title='height')
check([test_node_zero, ["three", "four", "five", "six"]], check([test_node_zero, ["three", "four", "five", "six"]],
[test_node_one, ["two", "four", "five", "six"]], [test_node_one, ["two", "four", "five", "six"]],
[test_node_two, ["one", "seven", "five", "six"]]) [test_node_two, ["one", "seven", "five", "six"]])
......
...@@ -43,15 +43,15 @@ TEST_SUITE_MAX = 4 ...@@ -43,15 +43,15 @@ TEST_SUITE_MAX = 4
# more or less cores # more or less cores
PRIORITY_MAPPING = { PRIORITY_MAPPING = {
# int_index: (min cores, max cores) # int_index: (min cores, max cores)
1: ( 3, 3), 1: ( 3, 3),
2: ( 3, 3), 2: ( 3, 6),
3: ( 3, 6), 3: ( 6, 9),
4: ( 3, 6), 4: ( 6, 12),
5: ( 3, 6), 5: ( 9, 15),
6: ( 6, 9), 6: ( 9, 18),
7: ( 6, 9), 7: ( 12, 18),
8: ( 6, 9), 8: ( 15, 24),
9: ( 9, 15), 9: ( 18, 30),
} }
class ERP5ProjectUnitTestDistributor(XMLObject): class ERP5ProjectUnitTestDistributor(XMLObject):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment