aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/contexts/test_ovsdpdk.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-07-26 00:58:29 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-07-26 00:59:56 -0700
commitd9b9b8970312e13f798a367439cfc2c333c7fca4 (patch)
treed30731f7b23ec6ec11373e9f48e1dfcfcb2b6de8 /tests/unit/benchmark/contexts/test_ovsdpdk.py
parent12ce596d02be27abf4ab2e9aebb873002c6cd6a9 (diff)
fix sriov/ovs-dpdk unittests on systems with fewer than 10 cores
we need to wrap vcpupin modulo number of cores. also mock time.sleep Change-Id: I6433418a99505b469c61c81a9a023d84434fa0ee Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'tests/unit/benchmark/contexts/test_ovsdpdk.py')
-rw-r--r--tests/unit/benchmark/contexts/test_ovsdpdk.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/unit/benchmark/contexts/test_ovsdpdk.py b/tests/unit/benchmark/contexts/test_ovsdpdk.py
index 125e475af..ac25ec877 100644
--- a/tests/unit/benchmark/contexts/test_ovsdpdk.py
+++ b/tests/unit/benchmark/contexts/test_ovsdpdk.py
@@ -18,7 +18,6 @@ import mock
import unittest
from yardstick.benchmark.contexts import ovsdpdk
-from yardstick.benchmark.contexts.ovsdpdk import Ovsdpdk
NIC_INPUT = {
'interface': {},
@@ -227,10 +226,8 @@ class OvsdpdkTestCase(unittest.TestCase):
mock_ovs = mock.Mock()
ssh_mock.put = mock.Mock()
ovs_obj.check_output = mock.Mock(return_value=(0, "vm1"))
- self.assertIsNone(ovs_obj.setup_ovs_context(
- PCIS,
- NIC_DETAILS,
- DRIVER))
+ with mock.patch("yardstick.benchmark.contexts.ovsdpdk.time"):
+ self.assertIsNone(ovs_obj.setup_ovs_context(PCIS, NIC_DETAILS, DRIVER))
@mock.patch(
'yardstick.benchmark.contexts.ovsdpdk',