Skip to content

flaky: two load-related test flakes in the suite that gates every deploy #91

Description

@OsherElhadad

Two intermittent failures, both surfacing only under concurrent load. One investigation, not two mysteries found separately six weeks apart.

Neither is caused by the code under test. Both surfaced while a dozen agents ran proxies on one box at load average 10–14 — a condition normal CI does not reproduce, which is why they have gone unnoticed.

1. dash/TestEventsDerivesItsScopeFromTheResolver

Fails on a full go test ./... competing with another concurrent run.

  • 5/5 clean isolated, 30/30 clean under -count=30 -cpu=1, green on a solo package run.
  • Reproduced on a commit whose only dash change was a comment, so it cannot reach /api/events.
  • Cause: timing-sensitive SSE test — it asserts on whatever the recorder has flushed at the moment it looks. The dash package takes ~356s, so under contention the flush it needs has not landed.

2. TestDashboardAddsNoRequestLatencyWithContentCapture

Established by interleaved runs against origin/main, so it predates and is independent of any current branch.

  • Cause: a latency assertion measured on a machine already saturated. It compares request latency with content capture on against a budget that assumes the box is not competing with a dozen proxies.

Suggested fix

Both want an explicit synchronisation point rather than an implicit one:

  • For (1): poll for the expected event with a deadline, the way wait_for_rows already does for the request table, instead of asserting on the first read.
  • For (2): the budget needs to be either load-relative or the measurement taken under a quiescence check. Raising the constant just moves the flake.

Sleeping longer fixes neither.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    New/ToDo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions