Skip to content

Commit 57ba7ee

Browse files
fix YdbTestStoreFactory
1 parent c104083 commit 57ba7ee

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/Migrations/YdbMigrationsInfrastructureTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class YdbMigrationsInfrastructureFixture : MigrationsInfrastructureFixtur
1717

1818
protected override IServiceCollection AddServices(IServiceCollection serviceCollection)
1919
{
20-
serviceCollection.AddScoped<IExecutionStrategyFactory, NonRetryingExecutionStrategyFactory>();
20+
YdbTestStoreFactory.Instance.UseYdbExecutionStrategy = false;
2121
return base.AddServices(serviceCollection);
2222
}
2323
}

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/TestUtilities/YdbTestStoreFactory.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ namespace EntityFrameworkCore.Ydb.FunctionalTests.TestUtilities;
77
public class YdbTestStoreFactory(string? additionalSql = null) : RelationalTestStoreFactory
88
{
99
public static YdbTestStoreFactory Instance { get; } = new();
10-
10+
1111
private readonly string? _scriptPath = null;
1212

13+
public bool UseYdbExecutionStrategy { get; set; } = true;
14+
1315
public override TestStore Create(string storeName) =>
1416
new YdbTestStore(storeName, _scriptPath, additionalSql);
1517

1618
public override TestStore GetOrCreate(string storeName)
1719
=> new YdbTestStore(storeName, _scriptPath, additionalSql);
1820

1921
public override IServiceCollection AddProviderServices(IServiceCollection serviceCollection)
20-
=> serviceCollection.AddEntityFrameworkYdb();
22+
=> serviceCollection.AddEntityFrameworkYdb(UseYdbExecutionStrategy);
2123
}

0 commit comments

Comments
 (0)