Commit 9839c04d authored by Benjamin Blanc's avatar Benjamin Blanc

taskdistribution: rename getNextTest into getRunningTest

parent 2931595a
...@@ -260,19 +260,16 @@ class ScalabilityLauncher(object): ...@@ -260,19 +260,16 @@ class ScalabilityLauncher(object):
for file_to_move in file_to_move_list: for file_to_move in file_to_move_list:
shutil.move(file_to_move, new_directory_path) shutil.move(file_to_move, new_directory_path)
def getNextTest(self): def getRunningTest(self):
""" """
Return a ScalabilityTest with current running test case informations, Return a ScalabilityTest with current running test case informations,
or None if no test_case ready or None if no test_case ready
""" """
data = self.test_result.getNextTestCase() data = self.test_result.getRunningTestCase()
if data == None : if not data:
return None return None
decoded_data = Utils.deunicodeData(json.loads( decoded_data = Utils.deunicodeData(json.loads(data))
data return ScalabilityTest(decoded_data, self.test_result)
))
next_test = ScalabilityTest(decoded_data, self.test_result)
return next_test
def run(self): def run(self):
self.log("Scalability Launcher started, with:") self.log("Scalability Launcher started, with:")
...@@ -292,7 +289,7 @@ class ScalabilityLauncher(object): ...@@ -292,7 +289,7 @@ class ScalabilityLauncher(object):
# Main loop # Main loop
while True: while True:
current_test = self.getNextTest() current_test = self.getRunningTest()
if current_test == None: if current_test == None:
self.log("No Test Case Ready") self.log("No Test Case Ready")
else: else:
......
...@@ -410,12 +410,12 @@ class TestResultProxyProxy(TestResultProxy): ...@@ -410,12 +410,12 @@ class TestResultProxyProxy(TestResultProxy):
TestResultProxy.__init__(self, proxy, retry_time, logger, test_result_path, TestResultProxy.__init__(self, proxy, retry_time, logger, test_result_path,
node_title, revision) node_title, revision)
def getNextTestCase(self): def getRunningTestCase(self):
""" """
A proxy to getNextTestCase A proxy to getNextTestCase
Return the relative path of the test with the running state Return the relative path of the test with the running state
""" """
return self._retryRPC('getNextTestCase', [self._test_result_path]) return self._retryRPC('getRunningTestCase', [self._test_result_path])
def cancelTestCase(self, test_result_line_path): def cancelTestCase(self, test_result_line_path):
""" """
......
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