Reduce 2 minutes of sleeps in functional cli task trends test

Dummy.dummy_random_action was sleeping between 0-2 seconds and sleep was
called 4 * 5 times which produce ~20-40 extra seconds of sleeps

Change-Id: Iad3b119be372adceb9730fa518a83b25ca9f0633
This commit is contained in:
Boris Pavlovic 2017-07-30 15:07:27 -07:00 committed by Andrey Kurilin
parent 2f45502170
commit a3e5ad49cb

View File

@ -362,18 +362,43 @@ class TaskTestCase(unittest.TestCase):
def test_trends(self):
cfg1 = {
"Dummy.dummy": [
{"runner": {"type": "constant", "times": 2,
"concurrency": 2}}],
{
"runner": {
"type": "constant",
"times": 2,
"concurrency": 2
}
}
],
"Dummy.dummy_random_action": [
{"args": {"actions_num": 4},
"runner": {"type": "constant", "times": 2, "concurrency": 2}},
{"runner": {"type": "constant", "times": 2,
"concurrency": 2}}]}
{
"args": {"actions_num": 4},
"runner": {
"type": "constant",
"times": 2,
"concurrency": 2
}
},
{
"runner": {
"type": "constant",
"times": 2,
"concurrency": 2
}
}
]
}
cfg2 = {
"Dummy.dummy": [
{"args": {"sleep": 0.6},
"runner": {"type": "constant", "times": 2,
"concurrency": 2}}]}
{
"args": {"sleep": 0.2},
"runner": {
"type": "constant", "times": 2,
"concurrency": 2
}
}
]
}
config1 = utils.TaskConfig(cfg1)
config2 = utils.TaskConfig(cfg2)