Skip to content

Commit 156dcd5

Browse files
authored
Do not share sqlite memory DBs across tests (#35)
Fix the tests that have recently started to fail on the main branch. I believe this is due to [this change](jeremyevans/sequel@c9d2c11) in sequel that was [released in 5.98.0](https://github.com/jeremyevans/sequel/blob/309ad4c99b48f4de84ba454ed8435d6b4e8169f9/CHANGELOG#L17), on 2025-11-01, which was around the time our main branch builds started to fail. I think that the `slite:memory` database URL must now actually be writing to a `memory` _file_. By changing to use `sqlite:file::memory:?cache=private`, we make it exactingly clear we want the in-memory database, and nothing to be shared across connections.
1 parent b288d55 commit 156dcd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/integration/extensions/rom_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include Dry::Monads[:result]
77

88
let(:rom) do
9-
ROM.container(:sql, "sqlite:memory") do |config|
9+
ROM.container(:sql, "sqlite:file::memory:?cache=private") do |config|
1010
config.default.create_table(:foo) do
1111
column :bar, :string
1212
end

0 commit comments

Comments
 (0)