Skip to content

Commit

Permalink
add healthy check for pfcwd wb (sonic-net#14320)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
The case is flaky, failed sometimes.

How did you do it?
Add healthy check after warm reboot to determine whether the failed caused by warm-reboot or pfcwd

How did you verify/test it?
Local run the case
  • Loading branch information
lipxu authored Sep 2, 2024
1 parent 21ba5af commit 20657f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/pfcwd/test_pfcwd_warm_reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from .files.pfcwd_helper import EXPECT_PFC_WD_DETECT_RE, EXPECT_PFC_WD_RESTORE_RE
from .files.pfcwd_helper import send_background_traffic
from .files.pfcwd_helper import has_neighbor_device
from tests.common.utilities import wait_until

TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "templates")
TESTCASE_INFO = {'no_storm': {'test_sequence': ["detect", "restore", "warm-reboot", "detect", "restore"],
Expand Down Expand Up @@ -520,8 +521,13 @@ def pfcwd_wb_helper(self, fake_storm, testcase_actions, setup_pfc_test, enum_fan
self.storm_threads = []

for t_idx, test_action in enumerate(testcase_actions):
logger.info("Index {} test_action {}".format(t_idx, test_action))
if 'warm-reboot' in test_action:
reboot(self.dut, localhost, reboot_type="warm", wait_warmboot_finalizer=True)

assert wait_until(300, 20, 20, self.dut.critical_services_fully_started), \
"All critical services should fully started!"

continue

# Need to wait some time after warm-reboot for the counters to be created
Expand Down

0 comments on commit 20657f9

Please sign in to comment.