Commit 5f72cf02 authored by Benjamin Blanc's avatar Benjamin Blanc

Fix typo

parent 50c5ce48
......@@ -79,7 +79,9 @@ class ERP5TestNode(TestCase):
config["system_temp_folder"] = self.system_temp_folder
config["computer_id"] = "COMP-TEST"
config["server_url"] = "http://foo.bar"
config["link_to_testsuite_directory"] = self.link_to_testsuite_directory
config["httpd_ip"] = "[1234:5678:9101:1121:3141:5161:7181:9202]"
config["httpd_port2"] = "9080"
return TestNode(self.log, config)
def getTestSuiteData(self, add_third_repository=False, reference="foo"):
......@@ -832,6 +834,7 @@ branch = foo
pass
def test_scalability_as_master_11_run(self, my_test_type='ScalabilityTest'):
self.test_11_run(my_test_type, grade='master')
# TODO : add a test with master and a launchable testsuite -> patch a lot of methods
def test_scalability_as_slave_11_run(self, my_test_type='ScalabilityTest'):
self.test_11_run(my_test_type, grade='slave')
def test_scalability_12_spawn(self, my_test_type='ScalabilityTest'):
......
......@@ -189,7 +189,7 @@ class ScalabilityTestRunner():
software_path_list = []
# Here ipv6 url reachable from master profile
self.reachable_profile = os.path.join(
"https://",self.testnode['httpd_ip']+":"+self.testnode['httpd_port2'],
"https://",self.testnode.config['httpd_ip']+":"+self.testnode.config['httpd_port2'],
self.random_path, "software.cfg")
self.testnode.log("Software reachable profile path is : %s "
%(self.reachable_profile,))
......
......@@ -308,8 +308,6 @@ branch = %(branch)s
try:
while True:
try:
##BLOCK OK
node_test_suite = None
self.log = self.process_manager.log = self.testnode_log
self.cleanUp(None)
......@@ -324,20 +322,15 @@ branch = %(branch)s
test_suite_data = testnodeUtils.deunicodeData(json.loads(test_suite_json))
log("Got following test suite data from master : %r" % \
(test_suite_data,))
##/BLOCK OK
# TODO : implement this method for each distributor
# into nexedi/master-erp5..
# (just UnitTestDistributor should be sufficient)
try:
my_test_type = self.test_suite_portal.getTestType()
except:
log("testnode, error during requesting getTestType() method \
from the distributor.")
raise NotImplementedError
# Select runner according to the test type
if my_test_type == 'UnitTest':
runner = UnitTestRunner(self)
......@@ -347,14 +340,12 @@ from the distributor.")
log("testnode, Runner type not implemented.", my_test_type)
raise NotImplementedError
log("Type of current test is %s" %(my_test_type,))
# master gets test_suites, slaves get nothing
# master testnode gets test_suites, slaves get nothing
runner.prepareSlapOSForTestNode(test_node_slapos)
#Clean-up test suites
# Clean-up test suites
self.checkOldTestSuite(test_suite_data)
for test_suite in test_suite_data:
## BLOCK OK
remote_test_result_needs_cleanup = False
node_test_suite = self.getNodeTestSuite(
test_suite["test_suite_reference"])
......@@ -375,25 +366,18 @@ from the distributor.")
node_test_suite.project_title)
remote_test_result_needs_cleanup = True
log("testnode, test_result : %r" % (test_result, ))
## /BLOCK OK
if test_result is not None:
## BLOCK OK
self.registerSuiteLog(test_result, node_test_suite)
self.checkRevision(test_result,node_test_suite)
## /BLOCK OK
# Now prepare the installation of SlapOS and create instance
status_dict = runner.prepareSlapOSForTestSuite(node_test_suite)
# Give some time so computer partitions may start
# as partitions can be of any kind we have and likely will never have
# a reliable way to check if they are up or not ...
# time.sleep(20)
# For scalability test runTestSuite is a big part
time.sleep(20)
runner.runTestSuite(node_test_suite, portal_url)
# break the loop to get latest priorities from master
break
self.cleanUp(test_result)
......@@ -434,4 +418,4 @@ from the distributor.")
# Exceptions are swallowed during cleanup phase
log("GENERAL EXCEPTION, QUITING")
self.cleanUp(test_result)
log("GENERAL EXCEPTION, QUITING, cleanup finished")
log("GENERAL EXCEPTION, QUITING, cleanup finished")
\ No newline at end of file
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