Commit e6b35e6
committed
isolate poll-only elector fixtures
The poll-only leadership suite was creating parallel subtests from
fixtures that were supposed to be independent, but they still reused the
same shared test schema. That meant separate bundles could contend on
the same singleton `river_leader` row, turning one case's election work
into another case's timeout.
When that happened, subtests like `CompetingElectors`,
`LosesLeadership`, and `RequestResignStress` failed with election
errors such as `timeout: context deadline exceeded`, followed by cleanup
errors like `failed to deallocate cached statement(s): conn closed`:
https://github.com/riverqueue/river/actions/runs/24406465152
Add a regression that starts two independently created poll-only bundles
side by side and verifies that each bundle sees its own elected leader.
Then switch only the poll-only setup to build transactions with
`TestTxPgxDriver` and `DisableSchemaSharing`.
That keeps the shared transaction wrapper inside each subtest, so
multiple electors in one case can still coordinate on a single
transaction, while truly separate subtests stop contending on the same
leader row.1 parent 7354804 commit e6b35e6
1 file changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
365 | 367 | | |
366 | 368 | | |
367 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
368 | 398 | | |
369 | 399 | | |
370 | 400 | | |
| |||
0 commit comments