From d5dc53752f3e2ab287c64a72875ecb26a241400e Mon Sep 17 00:00:00 2001 From: chenhb-zte Date: Tue, 18 Apr 2017 10:34:47 +0800 Subject: [PATCH] Fix atomic wrapper If raw data is old format, we need to convert to new format, and specify the starting time with 0. 1.move out `rally task results` to cli module 2.port _test_atomic_action_timer to wrapper Afert porting report to new atomic format,we will move convert_atomic_actions to wrapper too. Change-Id: I6f42d7a9272673dccea8770c83b7084a2c9503d4 --- tests/unit/test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/unit/test.py b/tests/unit/test.py index 558820e3..d7c7b026 100644 --- a/tests/unit/test.py +++ b/tests/unit/test.py @@ -22,8 +22,8 @@ from oslotest import base from oslotest import mockpatch from rally.common import db -from rally.common import objects from rally import plugins +from rally.task import utils as tutils from tests.unit import fakes @@ -47,9 +47,8 @@ class TestCase(base.BaseTestCase): plugins.load() def _test_atomic_action_timer(self, atomic_actions, name): - _old_atomic_actions = objects.Task.convert_atomic_actions( - atomic_actions) - action_duration = _old_atomic_actions.get(name) + atomic_wrapper = tutils.WrapperForAtomicActions(atomic_actions) + action_duration = atomic_wrapper.get(name) self.assertIsNotNone(action_duration) self.assertIsInstance(action_duration, float)