From 26cd0242c95025e0d644db3a80dfe8dee83b6d7a Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 18 Feb 2022 10:35:08 +0000 Subject: 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 Change-Id: Ibac19fc5bbd82a150fec3c90940a37af6344fd4f --- test/framework.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/framework.py') 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: -- cgit 1.2.3-korg