Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/dhcp_relay/dhcp_relay_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def restart_dhcp_service(duthost):
def _is_dhcp_relay_ready():
output = duthost.shell('docker exec dhcp_relay supervisorctl status | grep dhcp | awk \'{print $2}\'',
module_ignore_errors=True)
return (not output['rc'] and output['stderr'] == '' and
return (not output['rc'] and output['stderr'] == '' and len(output['stdout_lines']) != 0 and
all(element == 'RUNNING' for element in output['stdout_lines']))

pytest_assert(wait_until(60, 1, 0, _is_dhcp_relay_ready), "dhcp_relay is not ready after restarting")
pytest_assert(wait_until(60, 1, 10, _is_dhcp_relay_ready), "dhcp_relay is not ready after restarting")