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:
parent
2f45502170
commit
a3e5ad49cb
@ -362,18 +362,43 @@ class TaskTestCase(unittest.TestCase):
|
|||||||
def test_trends(self):
|
def test_trends(self):
|
||||||
cfg1 = {
|
cfg1 = {
|
||||||
"Dummy.dummy": [
|
"Dummy.dummy": [
|
||||||
{"runner": {"type": "constant", "times": 2,
|
{
|
||||||
"concurrency": 2}}],
|
"runner": {
|
||||||
|
"type": "constant",
|
||||||
|
"times": 2,
|
||||||
|
"concurrency": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"Dummy.dummy_random_action": [
|
"Dummy.dummy_random_action": [
|
||||||
{"args": {"actions_num": 4},
|
{
|
||||||
"runner": {"type": "constant", "times": 2, "concurrency": 2}},
|
"args": {"actions_num": 4},
|
||||||
{"runner": {"type": "constant", "times": 2,
|
"runner": {
|
||||||
"concurrency": 2}}]}
|
"type": "constant",
|
||||||
|
"times": 2,
|
||||||
|
"concurrency": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"runner": {
|
||||||
|
"type": "constant",
|
||||||
|
"times": 2,
|
||||||
|
"concurrency": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
cfg2 = {
|
cfg2 = {
|
||||||
"Dummy.dummy": [
|
"Dummy.dummy": [
|
||||||
{"args": {"sleep": 0.6},
|
{
|
||||||
"runner": {"type": "constant", "times": 2,
|
"args": {"sleep": 0.2},
|
||||||
"concurrency": 2}}]}
|
"runner": {
|
||||||
|
"type": "constant", "times": 2,
|
||||||
|
"concurrency": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
config1 = utils.TaskConfig(cfg1)
|
config1 = utils.TaskConfig(cfg1)
|
||||||
config2 = utils.TaskConfig(cfg2)
|
config2 = utils.TaskConfig(cfg2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user