Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaiMR committed Aug 15, 2023
1 parent 0dd77d9 commit dda4e32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/bgp/test_bgp_update_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
NEIGHBOR_PORT0 = 11000
NEIGHBOR_PORT1 = 11001
WAIT_TIMEOUT = 120
TCPDUMP_WAIT_TIMEOUT = 20


def is_tcpdump_running(duthost, cmd):
Expand Down Expand Up @@ -69,8 +70,11 @@ def log_bgp_updates(duthost, iface, save_path, ns):
duthost.asic_instance_from_namespace(ns).ns_arg, start_pcap
)
duthost.shell(start_pcap_cmd)
if not wait_until(WAIT_TIMEOUT, 5, 20, lambda: is_tcpdump_running(duthost, start_pcap),):
# wait until tcpdump process created
if not wait_until(WAIT_TIMEOUT, 5, 1, lambda: is_tcpdump_running(duthost, start_pcap),):
pytest.fail("Could not start tcpdump")
# sleep and waiting for tcpdump start to work (schedualed)
time.sleep(TCPDUMP_WAIT_TIMEOUT)

try:
yield
Expand Down

0 comments on commit dda4e32

Please sign in to comment.