Skip to content

[TEST FLAKE] Two live-store tests fail on unrelated diffs and pass on re-run (scale-test noise floor, and a database-state heal race) #2266

Description

@erikdarlingdata

Two tests failed today on PRs whose diffs cannot reach them, and both passed on a re-run of the same commit. Filing rather than leaving them as re-run folklore.

1. StoreSelfMetricsTests.ScaleTest_JobDurationGrowsWithVolume_TelemetryRecordsIt_AndTheAlertFires_AgainstDevPostgres

10x volume did not run longer than 1x (d1=970ms, d10=863ms) — job runtime is not scaling
with volume, which invalidates the #2136 capacity model.

StoreSelfMetricsTests.cs:404. Failed on #2265, whose diff is the Azure sweep predicate plus two new test files.

Root cause is in the assertion, not the product. It compares two sub-second durations on a shared CI runner and requires the larger volume to be strictly slower. At ~900 ms the run-to-run noise exceeds the signal it is trying to measure — 1× happened to land 107 ms slower than 10×. The capacity model it guards is real; the measurement just has no margin.

Worth considering: require a ratio rather than an inequality (e.g. d10 > d1 * 1.5), scale the volumes until the difference clears the noise floor, or take a best-of-N. As written it will keep failing at a low rate forever, and each failure costs a re-run and a moment of "is that mine?".

2. DatabaseStateExpectedStoreTests.RebaselinedByHandDuringAnOutage_HealsOnceTheDatabaseRecovers

Assert.Empty() Failure: Collection was not empty
Collection: [DatabaseStateInfo { DatabaseName = "Payments", ExpectedState = "SUSPECT",
             LastAlertedState = "", StateDesc = "ONLINE" }]

Lite.Tests/DatabaseStateExpectedStoreTests.cs:342. Failed on the same PR one commit later — a commit that deleted an unused method and rewrote two doc summaries, so it cannot reach this test either. Passed on re-run.

I did not get to a root cause on this one. The expected state was still SUSPECT when the test expected it cleared, which reads like an ordering or visibility issue in the store rather than noise, so it may be a genuine race worth someone looking at properly rather than a timing tolerance.

Why file it

Both cost a re-run today, and #2223 is already open for a third flake in the same suite family. A re-run that goes green teaches nothing durable, and the next person to see either failure will spend the same few minutes deciding whether it is theirs. Two of these in one afternoon on unrelated diffs is also the point at which the pattern matters more than the individual tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions