| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Test.Migration.Budget
Synopsis
- testBudgetMigration :: HasCallStack => App ()
Documentation
testBudgetMigration :: HasCallStack => App () Source #
Drives the login rate-limit (budget) store through the cutover lifecycle (cassandra -> migration-to-postgresql -> postgresql). Budget rows are ephemeral TTL'd counters, so unlike the other store migrations there is no backfill worker: Cassandra rows age out on their own while new writes flow to Postgres. The 60s login-block timeout is what keeps rows alive across backend restarts within this test.
P2 proves reads stay Cassandra-sourced during dual-write (u1's Cassandra row still blocks). P3 proves a row dual-written under migration-to-postgresql is visible to the pure Postgres interpreter (u2 still blocked), and that a Cassandra-only row does NOT survive cutover (u1 unblocked) — the documented no-backfill behavior.