summaryrefslogtreecommitdiffstats
path: root/test/test_l2_fib.py
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2021-08-20 09:18:31 +0200
committerDamjan Marion <dmarion@me.com>2021-11-22 16:44:26 +0000
commit56eccdbaa982a6aff16fbc2a651fd024ecc589a8 (patch)
tree9ad2dfae55bf356d6c03b328744d690c64f8e0ef /test/test_l2_fib.py
parentf33979ba88111be3b7935ea90172422e4d4a114b (diff)
vlib: add virtual time support
Type: feature Change-Id: Iabd76558e9c72ed8286cfeeb1fbaa4fde4832a90 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'test/test_l2_fib.py')
-rw-r--r--test/test_l2_fib.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_l2_fib.py b/test/test_l2_fib.py
index 941c94ad80a..065e57e5343 100644
--- a/test/test_l2_fib.py
+++ b/test/test_l2_fib.py
@@ -486,7 +486,7 @@ class TestL2fib(VppTestCase):
self.vapi.want_l2_macs_events()
self.learn_hosts(bd1, hosts)
- self.sleep(1)
+ self.virtual_sleep(1)
self.logger.info(self.vapi.ppcli("show l2fib"))
evs = self.vapi.collect_events()
action = VppEnum.vl_api_mac_event_action_t.MAC_EVENT_ACTION_API_ADD
@@ -509,7 +509,7 @@ class TestL2fib(VppTestCase):
self.sleep(1)
self.learn_hosts(bd1, hosts)
- self.sleep(1)
+ self.virtual_sleep(1)
self.logger.info(self.vapi.ppcli("show l2fib"))
evs = self.vapi.collect_events()
action = VppEnum.vl_api_mac_event_action_t.MAC_EVENT_ACTION_API_ADD
@@ -560,7 +560,7 @@ class TestL2fib(VppTestCase):
self.sleep(1)
self.learn_hosts(bd1, hosts)
- self.sleep(1)
+ self.virtual_sleep(1)
self.logger.info(self.vapi.ppcli("show l2fib"))
evs = self.vapi.collect_events()
self.vapi.want_l2_macs_events2(enable_disable=0)
@@ -577,6 +577,5 @@ class TestL2fib(VppTestCase):
self.assertLess(len(e), ev_macs * 10)
self.assertEqual(len(learned_macs ^ macs), 0)
-
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)