fix(site-runtime): site SQLite runs WAL with an explicit busy-timeout floor (S8) — concurrent writers stop serializing on the rollback journal
This commit is contained in:
@@ -42,6 +42,19 @@ public class SiteStorageServiceTests : IAsyncLifetime, IDisposable
|
||||
await _storage.InitializeAsync();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Initialize_EnablesWalJournalMode()
|
||||
{
|
||||
// WAL is set once at InitializeAsync (persistent, database-level). A file-backed DB
|
||||
// is required — WAL is not available for :memory: databases.
|
||||
await using var conn = _storage.CreateConnection();
|
||||
await conn.OpenAsync();
|
||||
await using var cmd = conn.CreateCommand();
|
||||
cmd.CommandText = "PRAGMA journal_mode;";
|
||||
var mode = (string)(await cmd.ExecuteScalarAsync())!;
|
||||
Assert.Equal("wal", mode.ToLowerInvariant());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task StoreAndRetrieve_DeployedConfig_RoundTrips()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user