Repository navigation
Commit 1e4d8d4
committed
test: install the busy handler the test assumes
The unrestorable busy wait test assumed that its connection already had
a Ruby busy handler, which PRAGMA busy_timeout reads as 0. Rails 7.2
and later install that handler on each new connection, and an earlier
sync call installs it too. A new Rails 7.1 connection instead uses
SQLite's own busy_timeout, which PRAGMA reads as 5000.
When the test ran first on Rails 7.1, the adapter correctly took the
restorable path and put back SQLite's own wait. That wait holds the
Ruby VM lock, so the releaser thread could not release the write lock,
and the write raised SQLite3::BusyException after 5 s. Seed 11785
failed every time; CI run 35874660739 failed the same way.
Install the handler in the test and assert that PRAGMA reads 0, so the
test checks the unrestorable path on every Rails version and order.1 parent c18b82b commit 1e4d8d4
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| |||
0 commit comments