Merge "[Core] Introduce class-based scenarios"

This commit is contained in:
Jenkins 2016-06-22 20:12:01 +00:00 committed by Gerrit Code Review
commit 76fc38844c
2 changed files with 11 additions and 6 deletions

View File

@ -1662,6 +1662,14 @@ class FakeScenario(scenario.Scenario):
raise multiprocessing.TimeoutError() raise multiprocessing.TimeoutError()
@scenario.configure(name="classbased.fooscenario")
class FakeClassBasedScenario(FakeScenario):
"""Fake class-based scenario."""
def run(self, *args, **kwargs):
pass
class FakeTimer(rally_utils.Timer): class FakeTimer(rally_utils.Timer):
def duration(self): def duration(self):

View File

@ -200,9 +200,6 @@ class FakeClientsScenarioTestCase(ScenarioTestCase):
self._fake_clients = fakes.FakeClients() self._fake_clients = fakes.FakeClients()
def get_test_context(): def get_test_context(**kwargs):
return { kwargs["task"] = {"uuid": str(uuid.uuid4())}
"task": { return kwargs
"uuid": str(uuid.uuid4())
}
}