[Core] Introduce class-based scenarios
This adds support of scenarios implemented as classes in addition to existing method-based scenarios. First class-based scenario will be added in next patch. Implements: class-based-scenarios Change-Id: Ia383226a356cf1b24ac7125c028f547d9de74c0d
This commit is contained in:
parent
ae3bfea31c
commit
82676b2a94
@ -1662,6 +1662,14 @@ class FakeScenario(scenario.Scenario):
|
||||
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):
|
||||
|
||||
def duration(self):
|
||||
|
@ -200,9 +200,6 @@ class FakeClientsScenarioTestCase(ScenarioTestCase):
|
||||
self._fake_clients = fakes.FakeClients()
|
||||
|
||||
|
||||
def get_test_context():
|
||||
return {
|
||||
"task": {
|
||||
"uuid": str(uuid.uuid4())
|
||||
}
|
||||
}
|
||||
def get_test_context(**kwargs):
|
||||
kwargs["task"] = {"uuid": str(uuid.uuid4())}
|
||||
return kwargs
|
||||
|
Loading…
x
Reference in New Issue
Block a user