Commit 1c3f5ca
committed
fix(webapp): isolate runTableV2Status from its poller under test; qualify publication probe by schema
Code-review follow-ups on the v2 hardening:
- runTableV2Status no longer starts its background poller under vitest
(NODE_ENV=test). The module is imported by the mint/read sites, so the
import-time poll plus setInterval was firing live DB queries against the test
database and leaking a timer, and the async refresh could race tests that
drive the cached status directly. Tests exercise the gates by mutating the
cached state, so the poller only gets in the way.
- The publication-readiness probe now filters pg_publication_tables on
schemaname = "public", so a same-named table in another published schema
cannot satisfy the check.1 parent 2bc70be commit 1c3f5ca
2 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
| |||
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments