summaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorKlement Sekera <klement@graphiant.com>2022-02-18 10:35:08 +0000
committerKlement Sekera <klement.sekera@gmail.com>2022-02-24 12:51:33 +0000
commit26cd0242c95025e0d644db3a80dfe8dee83b6d7a (patch)
tree40051a3d6efd96a57745f371910116bd9f9f5497 /test/framework.py
parent40cfc1560ee6fa11e4d6c74e9730541a8a45b68a (diff)
tests: better reporting for unexpected packets
Raise a new UnexpectedPacketErrror, when a packet is captured unexpectedly. This pretty-prints a terse description of said packet. Type: improvement Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Change-Id: Ibac19fc5bbd82a150fec3c90940a37af6344fd4f
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/framework.py b/test/framework.py
index 1c81e8afabc..9266227f18e 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -1310,8 +1310,7 @@ class VppTestCase(CPUInterface, unittest.TestCase):
if not timeout:
timeout = 1
for i in self.pg_interfaces:
- i.get_capture(0, timeout=timeout)
- i.assert_nothing_captured(remark=remark)
+ i.assert_nothing_captured(timeout=timeout, remark=remark)
timeout = 0.1
finally:
if trace:
@@ -1365,8 +1364,7 @@ class VppTestCase(CPUInterface, unittest.TestCase):
timeout = 1
for i in self.pg_interfaces:
if i not in outputs:
- i.get_capture(0, timeout=timeout)
- i.assert_nothing_captured()
+ i.assert_nothing_captured(timeout=timeout)
timeout = 0.1
if stats_diff: