vlib: add virtual time support
Type: feature
Change-Id: Iabd76558e9c72ed8286cfeeb1fbaa4fde4832a90
Signed-off-by: Benoît Ganne <bganne@cisco.com>
diff --git a/test/test_l2_fib.py b/test/test_l2_fib.py
index 941c94a..065e57e 100644
--- a/test/test_l2_fib.py
+++ b/test/test_l2_fib.py
@@ -486,7 +486,7 @@
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 @@
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 @@
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 @@
self.assertLess(len(e), ev_macs * 10)
self.assertEqual(len(learned_macs ^ macs), 0)
-
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)