Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Sqlite 6_0_1 #531

Merged
merged 2 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions MBBSEmu.Tests/Btrieve/BtrieveFileProcessor_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public BtrieveFileProcessor_Tests()

public void Dispose()
{
SqliteConnection.ClearAllPools();

Directory.Delete(_modulePath, recursive: true);
}

Expand Down
3 changes: 3 additions & 0 deletions MBBSEmu.Tests/DOS/BtrieveRuntime_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using MBBSEmu.DOS;
using MBBSEmu.IO;
using MBBSEmu.Resources;
using Microsoft.Data.Sqlite;
using NLog;
using System;
using System.IO;
Expand Down Expand Up @@ -33,6 +34,8 @@ public BtrieveRuntime_Tests()

public void Dispose()
{
SqliteConnection.ClearAllPools();

Directory.Delete(_modulePath, recursive: true);
}

Expand Down
5 changes: 5 additions & 0 deletions MBBSEmu.Tests/Integration/MBBSEmuIntegrationTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using MBBSEmu.Resources;
using MBBSEmu.Session;
using MBBSEmu.TextVariables;
using Microsoft.Data.Sqlite;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -35,6 +36,10 @@ public MBBSEmuIntegrationTestBase()

public void Dispose()
{
_serviceResolver.Dispose();

SqliteConnection.ClearAllPools();

Directory.Delete(_modulePath, recursive: true);
}

Expand Down
1 change: 1 addition & 0 deletions MBBSEmu/Btrieve/BtrieveFileProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public void Dispose()
{
cmd.Dispose();
}
_sqlCommands.Clear();

Connection.Close();
Connection.Dispose();
Expand Down
2 changes: 2 additions & 0 deletions MBBSEmu/Btrieve/BtrieveQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class SqliteReader : IDisposable
public void Dispose()
{
DataReader?.Dispose();
// Purposefully not Disposing of Command because it's likely cached by BtrieveFileProcessor, so let that class
// handle the cleanup
}
}

Expand Down
2 changes: 1 addition & 1 deletion MBBSEmu/MBBSEmu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Iced" Version="1.10.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.12" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
Expand Down