Report SMTP-27 delivery matrix on timeout
This commit is contained in:
@@ -568,16 +568,36 @@ def validate_initial(
|
||||
"initial")
|
||||
for name in failure
|
||||
}
|
||||
wait_until(
|
||||
lambda: (
|
||||
all(matching_messages(
|
||||
captures[name],
|
||||
next(route for route in ROUTES if route.name == name),
|
||||
"initial") for name in success)
|
||||
and queued_tokens(queued) == queued
|
||||
),
|
||||
"DANE and MTA-STS initial outcomes",
|
||||
)
|
||||
try:
|
||||
wait_until(
|
||||
lambda: (
|
||||
all(matching_messages(
|
||||
captures[name],
|
||||
next(route for route in ROUTES if route.name == name),
|
||||
"initial") for name in success)
|
||||
and queued_tokens(queued) == queued
|
||||
),
|
||||
"DANE and MTA-STS initial outcomes",
|
||||
)
|
||||
except SMTP27Error as error:
|
||||
details = []
|
||||
for route in ROUTES:
|
||||
connections, starttls, messages = captures[route.name].snapshot()
|
||||
matching = len(matching_messages(
|
||||
captures[route.name], route, "initial"))
|
||||
details.append(
|
||||
f"{route.name}: connections={connections}, "
|
||||
f"starttls={starttls}, messages={len(messages)}, "
|
||||
f"matching={matching}")
|
||||
found = queued_tokens(queued)
|
||||
details.append(
|
||||
"queued expected="
|
||||
+ ",".join(sorted(queued))
|
||||
+ " found="
|
||||
+ ",".join(sorted(found)))
|
||||
raise SMTP27Error(
|
||||
str(error) + "\n--- delivery matrix ---\n"
|
||||
+ "\n".join(details)) from error
|
||||
for name in success:
|
||||
route = next(route for route in ROUTES if route.name == name)
|
||||
messages = matching_messages(captures[name], route, "initial")
|
||||
|
||||
Reference in New Issue
Block a user