From 74c0bf516fa91541d9f51b8e79080cc383a6232d Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Tue, 4 Aug 2026 22:07:21 -0700 Subject: [PATCH] test(diff): relax STA-3420 burst assertions to inclusive comparisons Switch from strict inequality checks (toBeLessThan, toBeGreaterThan) to inclusive variants (toBeLessThanOrEqual, toBeGreaterThanOrEqual) to allow measurements landing exactly on the threshold boundaries. --- tests/e2e/combined-diff-invalidation-freeze-repro.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/combined-diff-invalidation-freeze-repro.spec.ts b/tests/e2e/combined-diff-invalidation-freeze-repro.spec.ts index 4f458994d41..cb11acf25f3 100644 --- a/tests/e2e/combined-diff-invalidation-freeze-repro.spec.ts +++ b/tests/e2e/combined-diff-invalidation-freeze-repro.spec.ts @@ -304,13 +304,13 @@ test.describe('Combined diff invalidation freeze repro (STA-3420)', () => { // Why: before the fix this window blocked continuously — p95 3963ms, 16 samples in 23s. // Every limit rides the identical idle window so a slow machine's floor can't fail the test; // the allowances on top are what the burst itself is permitted to add. - expect(measurement.burst.p95LagMs).toBeLessThan(measurement.baseline.p95LagMs + 100) - expect(measurement.burst.sampleCount).toBeGreaterThan( + expect(measurement.burst.p95LagMs).toBeLessThanOrEqual(measurement.baseline.p95LagMs + 100) + expect(measurement.burst.sampleCount).toBeGreaterThanOrEqual( Math.min(measurement.baseline.sampleCount, measurement.expectedSampleCount) * 0.85 ) // Why: peak lag tracks the idle floor of this fixture, not invalidation; only a regression // that adds a full extra second of blocking on top of that floor is this bug returning. - expect(measurement.burst.maxLagMs).toBeLessThan( + expect(measurement.burst.maxLagMs).toBeLessThanOrEqual( Math.max(measurement.baseline.maxLagMs, 100) + 1_000 ) } finally {