Commit cc7c8b13 authored by Benjamin Blanc's avatar Benjamin Blanc

runScalabilityTestSuite: Fix user index and use new method name

parent 9839c04d
...@@ -289,10 +289,13 @@ class ScalabilityLauncher(object): ...@@ -289,10 +289,13 @@ class ScalabilityLauncher(object):
# Main loop # Main loop
while True: while True:
current_test = self.getRunningTest() current_test = self.getRunningTest()
if current_test == None: while not current_test:
self.log("No Test Case Ready") time.sleep(15)
else: current_test = self.getRunningTest()
error_count = 1 error_count = 1
# Do not run a test while there are pending activities # Do not run a test while there are pending activities
...@@ -318,6 +321,7 @@ class ScalabilityLauncher(object): ...@@ -318,6 +321,7 @@ class ScalabilityLauncher(object):
# Generate commands to run # Generate commands to run
command_list = [] command_list = []
user_index = 0
for test_suite in test_suite_list: for test_suite in test_suite_list:
command_list.append([tester_path, command_list.append([tester_path,
self.__argumentNamespace.erp5_url, self.__argumentNamespace.erp5_url,
...@@ -330,7 +334,9 @@ class ScalabilityLauncher(object): ...@@ -330,7 +334,9 @@ class ScalabilityLauncher(object):
'--report-directory', self.__argumentNamespace.log_path, '--report-directory', self.__argumentNamespace.log_path,
'--repeat', "%s" %str(MAX_DOCUMENTS), '--repeat', "%s" %str(MAX_DOCUMENTS),
'--max-errors', str(1000000), '--max-errors', str(1000000),
'--user-index', str(user_index),
]) ])
user_index += user_number/len(test_suite_list)
# Launch # Launch
tester_process_list = [] tester_process_list = []
...@@ -397,8 +403,6 @@ class ScalabilityLauncher(object): ...@@ -397,8 +403,6 @@ class ScalabilityLauncher(object):
duration=test_duration) duration=test_duration)
self.log("Test Case Stopped") self.log("Test Case Stopped")
# Sleep between two loops
time.sleep(5)
return error_message_set, exit_status return error_message_set, exit_status
def main(): def main():
......
...@@ -417,22 +417,6 @@ class TestResultProxyProxy(TestResultProxy): ...@@ -417,22 +417,6 @@ class TestResultProxyProxy(TestResultProxy):
""" """
return self._retryRPC('getRunningTestCase', [self._test_result_path]) return self._retryRPC('getRunningTestCase', [self._test_result_path])
def cancelTestCase(self, test_result_line_path):
"""
"""
return self._retryRPC('cancelTestCase', [test_result_line_path])
def stopTestCase(self, test_result_line_path):
"""
"""
return self._retryRPC('stopTestCase', [test_result_line_path])
class ServerProxy(xmlrpclib.ServerProxy): class ServerProxy(xmlrpclib.ServerProxy):
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
...@@ -510,7 +494,6 @@ class TaskDistributionTool(RPCRetry): ...@@ -510,7 +494,6 @@ class TaskDistributionTool(RPCRetry):
class TaskDistributor(RPCRetry): class TaskDistributor(RPCRetry):
def __init__(self,portal_url,retry_time=64,logger=None): def __init__(self,portal_url,retry_time=64,logger=None):
if logger is None: if logger is None:
logger = null_logger logger = null_logger
if portal_url is None: if portal_url is None:
......
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