How should wait strategies differ between pull-request checks and nightly automation suites?
Answer
Both suites should wait for observable application conditions rather than fixed delays, but they may use different time budgets, retry policies and diagnostic depth. Pull-request checks should fail quickly on high-signal conditions, while nightly runs can cover slower workflows without hiding failures behind broad retries. Track duration and flakiness by test, preserve timeout evidence and treat repeated retries as a defect signal rather than proof of stability.
Strong answer includes
- uses condition-based waits instead of fixed sleeps
- separates feedback goals from correctness rules
- measures retries and timeouts as quality signals
Practical example
For example, a PR check waits for a specific 'order confirmed' element with a 5-second timeout and fails fast if it doesn't appear, giving developers quick feedback within a 3-minute pipeline. The nightly suite testing the same flow against a slower staging environment uses a 30-second condition-based wait for the same element but logs and dashboards every retry, and the team notices that flow's retry rate climbing from 2% to 15% over a week, flagging a real backend latency regression before it hits production.