Skip to content

Commit fc5437d

Browse files
committed
try wait for another test if deleting db doesnt work
1 parent 9287165 commit fc5437d

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_odbc_x86.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20564,8 +20564,6 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Fla
2056420564
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.GroupBy_Aggregate_over_navigations_repeated(async: False)
2056520565
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.GroupBy_Aggregate_over_navigations_repeated(async: True)
2056620566
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.GroupJoin_Anonymous_projection_GroupBy_Aggregate_join_elimination
20567-
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Include_group_join_is_per_query_context
20568-
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Include_group_join_is_per_query_context_async
2056920567
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Inlined_dbcontext_is_not_leaking
2057020568
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Left_join_with_missing_key_values_on_both_sides(async: False)
2057120569
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Left_join_with_missing_key_values_on_both_sides(async: True)
@@ -20635,7 +20633,6 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.No
2063520633
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.SplitQuery_disposes_inner_data_readers
2063620634
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.Unconfigured_query_splitting_behavior_throws_a_warning
2063720635
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.Using_AsSingleQuery_without_context_configuration_does_not_throw_warning
20638-
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.Using_AsSplitQuery_without_multiple_active_result_sets_works
2063920636
EntityFrameworkCore.Jet.FunctionalTests.Query.ComplexNavigationsCollectionsQueryJetTest.Check_all_tests_overridden
2064020637
EntityFrameworkCore.Jet.FunctionalTests.Query.ComplexNavigationsCollectionsQueryJetTest.Collection_projection_over_GroupBy_over_parameter(async: False)
2064120638
EntityFrameworkCore.Jet.FunctionalTests.Query.ComplexNavigationsCollectionsQueryJetTest.Collection_projection_over_GroupBy_over_parameter(async: True)

test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_oledb_x86.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20636,8 +20636,6 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Gro
2063620636
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.GroupBy_Aggregate_over_navigations_repeated(async: False)
2063720637
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.GroupBy_Aggregate_over_navigations_repeated(async: True)
2063820638
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.GroupJoin_Anonymous_projection_GroupBy_Aggregate_join_elimination
20639-
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Include_group_join_is_per_query_context
20640-
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Include_group_join_is_per_query_context_async
2064120639
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Inlined_dbcontext_is_not_leaking
2064220640
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Nested_queries_does_not_cause_concurrency_exception_sync(tracking: False)
2064320641
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocMiscellaneousQueryJetTest.Nested_queries_does_not_cause_concurrency_exception_sync(tracking: True)
@@ -20720,7 +20718,6 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.No
2072020718
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.SplitQuery_disposes_inner_data_readers
2072120719
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.Unconfigured_query_splitting_behavior_throws_a_warning
2072220720
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.Using_AsSingleQuery_without_context_configuration_does_not_throw_warning
20723-
EntityFrameworkCore.Jet.FunctionalTests.Query.AdHocQuerySplittingQueryJetTest.Using_AsSplitQuery_without_multiple_active_result_sets_works
2072420721
EntityFrameworkCore.Jet.FunctionalTests.Query.ComplexNavigationsCollectionsQueryJetTest.Check_all_tests_overridden
2072520722
EntityFrameworkCore.Jet.FunctionalTests.Query.ComplexNavigationsCollectionsQueryJetTest.Collection_projection_over_GroupBy_over_parameter(async: False)
2072620723
EntityFrameworkCore.Jet.FunctionalTests.Query.ComplexNavigationsCollectionsQueryJetTest.Collection_projection_over_GroupBy_over_parameter(async: True)

test/EFCore.Jet.FunctionalTests/Query/AdHocQuerySplittingQueryJetTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected override DbContextOptionsBuilder ClearQuerySplittingBehavior(DbContext
5353

5454
protected override TestStore CreateTestStore25225()
5555
{
56-
var testStore = JetTestStore.Create(StoreName);
56+
var testStore = JetTestStore.Create(StoreName + "25225");
5757
testStore.UseConnectionString = true;
5858
return testStore;
5959
}
@@ -285,7 +285,7 @@ public virtual async Task Using_AsSplitQuery_without_multiple_active_result_sets
285285
{
286286
var contextFactory = await InitializeAsync<Context21355>(
287287
seed: c => c.SeedAsync(),
288-
createTestStore: () => JetTestStore.Create(StoreName));
288+
createTestStore: () => JetTestStore.Create(StoreName + "21355"));
289289

290290
using var context = contextFactory.CreateContext();
291291
context.Parents.Include(p => p.Children1).Include(p => p.Children2).AsSplitQuery().ToList();

test/EFCore.Jet.FunctionalTests/TestUtilities/JetTestStore.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,25 @@ private bool CreateDatabase(Func<DbContext, Task>? clean)
130130
//return false;
131131
}
132132

133-
// Delete the database to ensure it's recreated with the correct file path
134-
DeleteDatabase();
133+
//Call DeleteDatabase(). If you get IOException, wait 1 sec then retry, up to a max of 3 times
134+
int retryCount = 0;
135+
while (true)
136+
{
137+
try
138+
{
139+
DeleteDatabase();
140+
break;
141+
}
142+
catch (IOException)
143+
{
144+
if (++retryCount >= 3)
145+
{
146+
throw;
147+
}
148+
Thread.Sleep(1000);
149+
}
150+
}
151+
135152
}
136153

137154
JetConnection.CreateDatabase(connectionString);

0 commit comments

Comments
 (0)