summaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
diff options
context:
space:
mode:
authorEmma Foley <emma.l.foley@intel.com>2018-06-29 08:36:04 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-29 08:36:04 +0000
commit1e515b6cc3dd15c399f2663999c9734610494e5c (patch)
treec40f1cf484ddf0d6d5bba1f749192bd594ffcda2 /yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
parenteb54a9e65e838e092e5acb5a8bd4119dd2e9f556 (diff)
parenteaebb40c960284d7d4ce9ad6221cba32c04a2827 (diff)
Merge "Convert SLA asserts to raises" into stable/fraser
Diffstat (limited to 'yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py')
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
index 74144afd5..2190e9337 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
@@ -19,6 +19,7 @@ from oslo_serialization import jsonutils
from yardstick.common import utils
from yardstick.benchmark.scenarios.networking import iperf3
+from yardstick.common import exceptions as y_exc
@mock.patch('yardstick.benchmark.scenarios.networking.iperf3.ssh')
@@ -118,7 +119,7 @@ class IperfTestCase(unittest.TestCase):
sample_output = self._read_sample_output(self.output_name_tcp)
mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
- self.assertRaises(AssertionError, p.run, result)
+ self.assertRaises(y_exc.SLAValidationError, p.run, result)
def test_iperf_successful_sla_jitter(self, mock_ssh):
options = {"protocol": "udp", "bandwidth": "20m"}
@@ -152,7 +153,7 @@ class IperfTestCase(unittest.TestCase):
sample_output = self._read_sample_output(self.output_name_udp)
mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
- self.assertRaises(AssertionError, p.run, result)
+ self.assertRaises(y_exc.SLAValidationError, p.run, result)
def test_iperf_successful_tcp_protocal(self, mock_ssh):
options = {"protocol": "tcp", "nodelay": "yes"}