Files
triggerdotdev--trigger.dev/internal-packages
Chris Arderne 68ed809416 test(clickhouse): keep queue metrics fixtures within TTL (#4428)
## Summary

Keeps the queue metrics ClickHouse tests stable as wall-clock time
advances.

## Root cause

The fixtures used fixed timestamps. Once those timestamps crossed the
tables' 30-day retention boundary, ClickHouse immediately expired the
inserted aggregate rows and all six tests read empty results.

The fixtures now derive a recent minute-aligned timestamp once per test
file. The second 10-second bucket and ranking window are derived from
the same anchor, preserving deterministic bucket relationships while
keeping rows inside both the raw and aggregate table TTLs.

Verified with `pnpm --filter @internal/clickhouse exec vitest run
src/queueMetrics.test.ts`.
2026-07-30 21:20:44 +01:00
..