Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/support/optional/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def configuration
# own in-memory database, and the concurrency specs run invocations on their own
# threads, which check out their own connections.
def sqlite_configuration
at_exit { FileUtils.rm_f(SQLITE_PATH) }
# WAL mode (ActiveRecord 8's default) keeps -wal and -shm files beside the database.
at_exit { FileUtils.rm_f(["", "-wal", "-shm"].map { |suffix| "#{SQLITE_PATH}#{suffix}" }) }
# timeout: what every generated Rails database.yml sets. Without it SQLite's busy
# timeout is zero, and a writer that finds the write lock taken fails at once rather
# than waiting its turn — which the chain's concurrency spec exists to prove it does.
Expand Down
Loading