Commit fb2a7319 authored by Łukasz Nowak's avatar Łukasz Nowak

Adapt unfinished test

Unfinished test
(test_18_checkConfigurationGenerationERP5ScalabilityDistributor) uses
return value of subscribeNode and assumes it is ERP5 object.

This work changes return value of subscribeNode to JSON object,
following startTestSuite return value, thus rendering this test failure.

As test is unfinished, non asserting part has been commented out.
parent 78d5a2eb
...@@ -929,10 +929,9 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -929,10 +929,9 @@ class TestTaskDistribution(ERP5TypeTestCase):
test_node_module = self.test_node_module test_node_module = self.test_node_module
# Subscribe nodes # Subscribe nodes
node_list = [self.scalability_distributor.subscribeNode("COMP1-Scalability-Node1", computer_guid="COMP-1"), node_list = [
self.scalability_distributor.subscribeNode("COMP2-Scalability-Node2", computer_guid="COMP-2"), ('NODE-%s' % (i,), self.scalability_distributor.subscribeNode("COMP%s-Scalability-Node%s" % (i, i), computer_guid="COMP-%s" % (i,))) for i in range(1,5)
self.scalability_distributor.subscribeNode("COMP3-Scalability-Node3", computer_guid="COMP-3"), ]
self.scalability_distributor.subscribeNode("COMP4-Scalability-Node4", computer_guid="COMP-4")]
self.tic() self.tic()
self._callOptimizeAlarm() self._callOptimizeAlarm()
...@@ -944,10 +943,10 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -944,10 +943,10 @@ class TestTaskDistribution(ERP5TypeTestCase):
partition_dict = "" partition_dict = ""
for j in range(0,i): for j in range(0,i):
family_name = ['user', 'activity'][j%2] family_name = ['user', 'activity'][j%2]
partition_dict += '"%s-%s":{\n' %(family_name, node_list[j].getReference()) partition_dict += '"%s-%s":{\n' %(family_name, node_list[j][0])
partition_dict += ' "instance-count": {{ count }},\n' partition_dict += ' "instance-count": {{ count }},\n'
partition_dict += ' "family": "%s",\n' %family_name partition_dict += ' "family": "%s",\n' %family_name
partition_dict += ' "computer_guid": "%s"\n' %node_list[j].getReference() partition_dict += ' "computer_guid": "%s"\n' %node_list[j][0]
partition_dict += '}' partition_dict += '}'
if j != i-1: if j != i-1:
partition_dict += ',\n' partition_dict += ',\n'
...@@ -973,17 +972,17 @@ class TestTaskDistribution(ERP5TypeTestCase): ...@@ -973,17 +972,17 @@ class TestTaskDistribution(ERP5TypeTestCase):
graph_coordinate=graph_coordinate, cluster_configuration=cluster_configuration) graph_coordinate=graph_coordinate, cluster_configuration=cluster_configuration)
self.tic() self.tic()
# Master test node launch startTestSuite # # Master test node launch startTestSuite
for node in node_list: # for node in node_list:
if node.getMaster(): # if node.getMaster():
test_suite_title = self.scalability_distributor.startTestSuite(title=node.getTitle()) # test_suite_title = self.scalability_distributor.startTestSuite(title=node.getTitle())
# log("test_suite_title: %s" %test_suite_title) ## log("test_suite_title: %s" %test_suite_title)
break # break
# Get configuration list generated from test suite # # Get configuration list generated from test suite
# configuration_list = self.scalability_distributor.generateConfiguration(test_suite_title) ## configuration_list = self.scalability_distributor.generateConfiguration(test_suite_title)
#
# logs # # logs
# log(configuration_list) ## log(configuration_list)
def test_19_testMultiDistributor(self): def test_19_testMultiDistributor(self):
pass pass
......
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