Skip to content

Commit

Permalink
add more waiting time for test
Browse files Browse the repository at this point in the history
Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
  • Loading branch information
richardyu-ms committed Jun 24, 2022
1 parent c3fe4b5 commit 343d16b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion test/sai_test/config/fdb_configer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=1):
"""
Create FDB entries.
Expand All @@ -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):
"""
Expand Down
2 changes: 1 addition & 1 deletion test/sai_test/config/switch_configer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions test/sai_test/sai_sanity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from ptf import config
from ptf.testutils import *
from ptf.thriftutils import *
import time


class SaiSanityTest(T0TestBase):
Expand Down Expand Up @@ -59,6 +60,7 @@ def test_flooding_to_ports(self):
eth_src=unknown_mac2,
ip_id=101,
ip_ttl=64)
time.sleep(5)
try:
# Unknown mac, flooding to all the other ports.
print("Sanity test, check all the ports be flooded.")
Expand Down
6 changes: 5 additions & 1 deletion test/sai_test/sai_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
'''
Expand Down

0 comments on commit 343d16b

Please sign in to comment.