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

[released/9.0] Add missing awaits in MigrationsInfrastructureTestBase #35107

Merged
merged 1 commit into from
Nov 14, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -286,21 +286,21 @@ await history.GetAppliedMigrationsAsync(),
}

[ConditionalFact]
public virtual void Can_generate_no_migration_script()
public virtual async Task Can_generate_no_migration_script()
{
using var db = Fixture.CreateEmptyContext();
var migrator = db.GetService<IMigrator>();

SetAndExecuteSqlAsync(migrator.GenerateScript());
await SetAndExecuteSqlAsync(migrator.GenerateScript());
}

[ConditionalFact]
public virtual void Can_generate_migration_from_initial_database_to_initial()
public virtual async Task Can_generate_migration_from_initial_database_to_initial()
{
using var db = Fixture.CreateContext();
var migrator = db.GetService<IMigrator>();

SetAndExecuteSqlAsync(migrator.GenerateScript(fromMigration: Migration.InitialDatabase, toMigration: Migration.InitialDatabase));
await SetAndExecuteSqlAsync(migrator.GenerateScript(fromMigration: Migration.InitialDatabase, toMigration: Migration.InitialDatabase));
}

[ConditionalFact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public override void Can_apply_range_of_migrations()
Fixture.TestSqlLoggerFactory.Log.Single(l => l.Id == RelationalEventId.NonTransactionalMigrationOperationWarning).Message);
}

public override void Can_generate_migration_from_initial_database_to_initial()
public override async Task Can_generate_migration_from_initial_database_to_initial()
{
base.Can_generate_migration_from_initial_database_to_initial();
await base.Can_generate_migration_from_initial_database_to_initial();

Assert.Equal(
"""
Expand All @@ -57,9 +57,9 @@ CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId])
ignoreLineEndingDifferences: true);
}

public override void Can_generate_no_migration_script()
public override async Task Can_generate_no_migration_script()
{
base.Can_generate_no_migration_script();
await base.Can_generate_no_migration_script();

Assert.Equal(
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace Microsoft.EntityFrameworkCore.Migrations
public class MigrationsInfrastructureSqliteTest(MigrationsInfrastructureSqliteTest.MigrationsInfrastructureSqliteFixture fixture)
: MigrationsInfrastructureTestBase<MigrationsInfrastructureSqliteTest.MigrationsInfrastructureSqliteFixture>(fixture)
{
public override void Can_generate_migration_from_initial_database_to_initial()
public override async Task Can_generate_migration_from_initial_database_to_initial()
{
base.Can_generate_migration_from_initial_database_to_initial();
await base.Can_generate_migration_from_initial_database_to_initial();

Assert.Equal(
"""
Expand All @@ -29,9 +29,9 @@ public override void Can_generate_migration_from_initial_database_to_initial()
ignoreLineEndingDifferences: true);
}

public override void Can_generate_no_migration_script()
public override async Task Can_generate_no_migration_script()
{
base.Can_generate_no_migration_script();
await base.Can_generate_no_migration_script();

Assert.Equal(
"""
Expand Down
Loading