Skip to content

Commit

Permalink
add more waiting time for test (opencomputeproject#1511)
Browse files Browse the repository at this point in the history
* add more waiting time for test

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Update fdb_configer.py

increase the waiting time for fdb entries update

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* remove useless change

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>
  • Loading branch information
richardyu-ms authored and chrispsommers committed Jul 11, 2022
1 parent 98ed901 commit 1d872c1
Show file tree
Hide file tree
Showing 4 changed files with 12 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=2):
"""
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
1 change: 1 addition & 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
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 1d872c1

Please sign in to comment.