Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why CI Email Tests Need a Canary Message

Description and use

CI email tests often fail with an ambiguous “verification email not received” error. Adding a deterministic canary message before the real workflow distinguishes environment/mailbox issues from application delivery problems, speeding debugging.

Problem

CI email tests often fail with a vague “verification email not received” message, making it hard to identify whether the failure is due to the application, email provider, mailbox, or test runner.

Outcome

Adding a canary message splits failures into environment/mailbox problems and application delivery problems, reducing false positives and guiding faster debugging.

Workflow

  • Allocate a mailbox owned by the current test run
  • Send a canary message with a unique subject
  • Wait for the canary using normal polling code
  • If canary arrives, execute the user-facing email flow
  • Wait for the product email and assert its contents
  • Classify failures with reason codes
  • Record minimal artifacts for triage
  • Release or schedule cleanup of the mailbox

Evidence

A small canary message makes this easier to diagnose. Before testing the real workflow, send a known message through the same inbox path and record whether it arrives.

Source

If the canary fails, the result is probably an environment or inbox problem. If it passes but the verification message fails, the application path deserves attention.

Source

Give the CI result a reason code instead of a generic timeout: canary_missing, product_missing, wrong_owner, late_delivery, invalid_token.

Source

  • Record date: 2026-11-01T04:13:55.240Z