Skip to content

Commit 8fec970

Browse files
committed
Version 5.2.1
1 parent a3b031b commit 8fec970

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

BenchmarkPostgreSql/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public async Task WipedByRespawnNoCheckDbExists()
3838
await _context.EnsureCreatedAndEmptyPostgreSqlAsync(true);
3939
}
4040

41-
[Benchmark]
42-
public async Task WipedByRespawnWithCheckForDbExists()
43-
{
44-
await _context.EnsureCreatedAndEmptyPostgreSqlAsync();
45-
}
41+
//[Benchmark]
42+
//public async Task WipedByRespawnWithCheckForDbExists()
43+
//{
44+
// await _context.EnsureCreatedAndEmptyPostgreSqlAsync();
45+
//}
4646

4747
[Benchmark]
4848
public void EnsureDeletedEnsureCreated()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# EfCore.TestSupport
22

3-
This NuGet package containing methods to help test applications that use [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/index) for database access. This readme provides links to the documentation in the [EfCore.TestSupport wiki](https://github.com/JonPSmith/EfCore.TestSupport/wiki). Also see [Release Notes](https://github.com/JonPSmith/EfCore.TestSupport/blob/master/ReleaseNotes.md) for information on changes.
3+
This NuGet package containing methods to help test applications that use [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/index) for database access using SQL Server, PostgreSQL and Cosmos DB. This readme provides links to the documentation in the [EfCore.TestSupport wiki](https://github.com/JonPSmith/EfCore.TestSupport/wiki). Also see [Release Notes](https://github.com/JonPSmith/EfCore.TestSupport/blob/master/ReleaseNotes.md) for information on changes.
44

55
The EfCore.TestSupport library is available on [NuGet as EfCore.TestSupport](https://www.nuget.org/packages/EfCore.TestSupport/) and is an open-source library under the MIT license. See [ReleaseNotes](https://github.com/JonPSmith/EfCore.TestSupport/blob/master/ReleaseNotes.md) for details of the changes in each vesion.
66

ReleaseNotes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release notes
22

3+
## 5.2.1
4+
5+
- Bug Fix: PostgreSQL EnsureClean had a memory leak - now fixed
6+
7+
38
## 5.2.0
49

510
- BREAKING CHANGE from 5.1.0: changed `CreatePostgreSqlUniqueDatabaseOptions` to `CreatePostgreSqlUniqueClassOptions` to match other usages

TestSupport/EfHelpers/CleanDatabaseExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static class CleanDatabaseExtensions
1717
/// <summary>
1818
/// Calling this will wipe the database schema down to nothing in the database and then calls
1919
/// Database.EnsureCreated to create the correct database schema based on your EF Core Context
20-
/// NOTE: This only works for SQL Server
20+
/// NOTE: This only works for SQL Server and PostgreSQL databases
2121
/// </summary>>
2222
/// <param name="databaseFacade">The Database property of the current DbContext that you want to clean</param>
2323
/// <param name="setUpSchema">Optional: by default it will set the schema to match the current DbContext configuration. If false leaves the database empty</param>

TestSupport/EfHelpers/Internal/PostgreSqlDropSchemaEnsureClean.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void FasterPostgreSqlEnsureClean(this DatabaseFacade databaseFacad
1818
var connectionString = databaseFacade.GetDbConnection().ConnectionString;
1919
if (connectionString.DatabaseExists())
2020
{
21-
var conn = new NpgsqlConnection(connectionString);
21+
using var conn = new NpgsqlConnection(connectionString);
2222
conn.Open();
2323

2424
var dropPublicSchemaCommand = new NpgsqlCommand

TestSupport/TestSupport.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@
4343

4444
<PropertyGroup>
4545
<PackageId>EfCore.TestSupport</PackageId>
46-
<PackageVersion>5.2.0</PackageVersion>
47-
<Version>5.2.0</Version>
48-
<AssemblyVersion>5.2.0.0</AssemblyVersion>
49-
<FileVersion>5.2.0.0</FileVersion>
46+
<PackageVersion>5.2.1</PackageVersion>
47+
<Version>5.2.1</Version>
48+
<AssemblyVersion>5.2.1.0</AssemblyVersion>
49+
<FileVersion>5.2.1.0</FileVersion>
5050
<Authors>Jon P Smith</Authors>
5151
<Description>Useful tools when unit testing applications that use Entity Framework Core. See readme file on github.</Description>
5252
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
5353
<PackageReleaseNotes>
54-
- BREAKING CHANGE from 5.1.0: changed CreatePostgreSqlUniqueDatabaseOptions to CreatePostgreSqlUniqueClassOptions to match other usages
55-
- Extra checks on the length of the PostgreSQL database as there is a 64 char limit
54+
- Bug Fix: PostgreSQL EnsureClean had a memory leak - now fixed
5655
</PackageReleaseNotes>
5756
<Copyright>Copyright (c) 2020 Jon P Smith. Licenced under MIT licence</Copyright>
5857
<PackageTags>Entity Framework Core, xUnit</PackageTags>

0 commit comments

Comments
 (0)