diff --git a/tests/functional/lib/bash/test_header b/tests/functional/lib/bash/test_header index 623a7103a89..45bc376cb0d 100644 --- a/tests/functional/lib/bash/test_header +++ b/tests/functional/lib/bash/test_header @@ -805,14 +805,13 @@ mock_smtpd_init() { # Logic borrowed from Rose # Try several ports in case any are in use: for SMTPD_PORT in 8025 8125 8225 8325 8425 8525 8625 8725 8825 8925; do local SMTPD_LOG="${TEST_DIR}/smtpd.log" - echo $SMTPD_LOG >&2 local SMTPD_HOST="localhost:${SMTPD_PORT}" # Set up fake SMTP server to catch outgoing mail & redirect to log: python3 -u -m 'aiosmtpd' -c aiosmtpd.handlers.Debugging stderr -d -n -l \ "${SMTPD_HOST}" \ 1>"${SMTPD_LOG}" 2>&1 & # Runs in background local SMTPD_PID="$!" - while ! grep -q 'DebuggingServer started' "${SMTPD_LOG}" 2>'/dev/null' + while ! grep -q 'is listening' "${SMTPD_LOG}" 2>'/dev/null' do if ps "${SMTPD_PID}" 1>/dev/null 2>&1; then sleep 1 # Still waiting for fake server to start @@ -822,6 +821,7 @@ mock_smtpd_init() { # Logic borrowed from Rose break fi done + echo "ici" >&2 if [[ -n "${SMTPD_PID:-}" ]]; then # Variables used by tests # shellcheck disable=SC2034