Commit dbbb166
committed
chore: read pgvector test assertions from primary to fix read-replica flake
The vector column tests read query results through the raw payload.db.drizzle
handle right after payload.create(). That handle is wrapped by withReplicas(),
so its reads default to a replica and bypass payload's read-after-write routing,
returning stale/empty rows on the postgres-read-replica adapter. Read through
payload.db.primaryDrizzle (falling back to drizzle when no replicas are
configured) so the assertions see the just-written rows.1 parent 9d946ac commit dbbb166
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
237 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
| |||
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
349 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
350 | 356 | | |
351 | 357 | | |
352 | 358 | | |
| |||
0 commit comments