Skip to content

Commit de1888d

Browse files
committed
Remove EnsureCreated from CleanDatabase
The EnsureCreated() call was creating tables that were immediately dropped, which could cause timing issues in CI. The database is already created by the fixture initialization, so EnsureCreated() is unnecessary.
1 parent 9c8180b commit de1888d

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

test/EFCore.Relational.Specification.Tests/RuntimeMigrationTestBase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ protected virtual List<string> GetTableNames(System.Data.Common.DbConnection con
8585

8686
protected virtual void CleanDatabase(RuntimeMigrationDbContext context)
8787
{
88-
context.Database.EnsureCreated();
8988
var connection = context.Database.GetDbConnection();
9089
var wasOpen = connection.State == System.Data.ConnectionState.Open;
9190
if (!wasOpen)

test/EFCore.SqlServer.FunctionalTests/RuntimeMigrationSqlServerTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ protected override Assembly ProviderAssembly
1616

1717
protected override void CleanDatabase(RuntimeMigrationDbContext context)
1818
{
19-
context.Database.EnsureCreated();
2019
var connection = context.Database.GetDbConnection();
2120
var wasOpen = connection.State == System.Data.ConnectionState.Open;
2221
if (!wasOpen)

0 commit comments

Comments
 (0)