diff --git a/test/sai_test/config/fdb_configer.py b/test/sai_test/config/fdb_configer.py index 88ecddac2..d8491dc7a 100644 --- a/test/sai_test/config/fdb_configer.py +++ b/test/sai_test/config/fdb_configer.py @@ -85,7 +85,8 @@ def create_fdb_entries(self, port_oids, type=SAI_FDB_ENTRY_TYPE_STATIC, vlan_oid=None, - packet_action=SAI_PACKET_ACTION_FORWARD): + packet_action=SAI_PACKET_ACTION_FORWARD, + wait_sec=2): """ Create FDB entries. @@ -110,6 +111,9 @@ def create_fdb_entries(self, type=type, bridge_port_id=port_oids[index], packet_action=packet_action) + print("Waiting for FDB to get refreshed, {} seconds ...".format( + wait_sec)) + time.sleep(wait_sec) def generate_mac_address_list(self, role, group, indexes): """ diff --git a/test/sai_test/config/switch_configer.py b/test/sai_test/config/switch_configer.py index 1ae075b3f..9c7cff7de 100644 --- a/test/sai_test/config/switch_configer.py +++ b/test/sai_test/config/switch_configer.py @@ -51,7 +51,7 @@ def __init__(self, test_obj) -> None: self.test_obj = test_obj self.client = test_obj.client - def start_switch(self, switch_init_wait=1, route_mac=ROUTER_MAC): + def start_switch(self, switch_init_wait=3, route_mac=ROUTER_MAC): """ Start switch and wait seconds for a warm up. diff --git a/test/sai_test/sai_sanity_test.py b/test/sai_test/sai_sanity_test.py index 9b1650cdc..1fe0ac5b5 100644 --- a/test/sai_test/sai_sanity_test.py +++ b/test/sai_test/sai_sanity_test.py @@ -22,6 +22,7 @@ from ptf import config from ptf.testutils import * from ptf.thriftutils import * +import time class SaiSanityTest(T0TestBase): diff --git a/test/sai_test/sai_test_base.py b/test/sai_test/sai_test_base.py index 7c9f02c8a..055ebc03c 100644 --- a/test/sai_test/sai_test_base.py +++ b/test/sai_test/sai_test_base.py @@ -181,7 +181,8 @@ def setUp(self, is_recreate_bridge=True, is_reset_default_vlan=True, is_create_vlan=True, - is_create_fdb=True): + is_create_fdb=True, + wait_sec=5): super(T0TestBase, self).setUp() self.port_configer = PortConfiger(self) self.switch_configer = SwitchConfiger(self) @@ -201,6 +202,9 @@ def setUp(self, t0_fdb_config_helper( test_obj=self, is_create_fdb=is_create_fdb) + print("Waiting for switch to get ready before test, {} seconds ...".format( + wait_sec)) + time.sleep(wait_sec) def shell(self): '''