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
4 changes: 3 additions & 1 deletion tests/BetterMail.Tests/DeletedMailRecoveryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ private static async Task WithPendingDelete(Func<EncryptedMailStore, string, Mai

private static async Task WriteLegacyRecoveryAsync(string path, string id, CancellationToken token)
{
await using var connection = new SqliteConnection(new SqliteConnectionStringBuilder { DataSource = path }.ToString());
// This temporary legacy-payload writer must release its file handle on disposal.
// A pooled connection keeps mail.db open and prevents cleanup on Windows.
await using var connection = new SqliteConnection(new SqliteConnectionStringBuilder { DataSource = path, Pooling = false }.ToString());
await connection.OpenAsync(token);
await using var key = connection.CreateCommand();
key.CommandText = $"PRAGMA key = '{new string('A', 64)}';";
Expand Down
Loading