diff options
author | Benoît Ganne <bganne@cisco.com> | 2021-08-20 09:18:31 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-11-22 16:44:26 +0000 |
commit | 56eccdbaa982a6aff16fbc2a651fd024ecc589a8 (patch) | |
tree | 9ad2dfae55bf356d6c03b328744d690c64f8e0ef /test/test_cnat.py | |
parent | f33979ba88111be3b7935ea90172422e4d4a114b (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_cnat.py')
-rw-r--r-- | test/test_cnat.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/test_cnat.py b/test/test_cnat.py index 198dd739d94..25c2a6454cb 100644 --- a/test/test_cnat.py +++ b/test/test_cnat.py @@ -430,16 +430,9 @@ class TestCNatTranslation(CnatCommonTestCase): # all disapper # self.vapi.cli("test cnat scanner on") - - n_tries = 0 + self.virtual_sleep(2) sessions = self.vapi.cnat_session_dump() - while (len(sessions) and n_tries < 100): - n_tries += 1 - sessions = self.vapi.cnat_session_dump() - self.sleep(2) - self.logger.info(self.vapi.cli("show cnat session verbose")) - - self.assertTrue(n_tries < 100) + self.assertEqual(len(sessions), 0) self.vapi.cli("test cnat scanner off") # |