From 7d8e3d3ff5ec0ba00ecb9be4e52137ef82e2449b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 19:03:37 +0000 Subject: [PATCH] Fix flaky parallel split query test: move ClearLog() before parallel tasks Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- .../Query/AdHocQuerySplittingQueryTestBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/EFCore.Relational.Specification.Tests/Query/AdHocQuerySplittingQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/AdHocQuerySplittingQueryTestBase.cs index db5d94e25ce..5996b604c52 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/AdHocQuerySplittingQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/AdHocQuerySplittingQueryTestBase.cs @@ -183,13 +183,13 @@ public class AnotherChild public virtual async Task Can_query_with_nav_collection_in_projection_with_split_query_in_parallel_async() { var (context1, context2) = await CreateTwoContext25225(); + ClearLog(); var task1 = QueryAsync(context1, Context25225.Parent1Id, Context25225.Collection1Id); var task2 = QueryAsync(context2, Context25225.Parent2Id, Context25225.Collection2Id); await Task.WhenAll(task1, task2); async Task QueryAsync(Context25225 context, Guid parentId, Guid collectionId) { - ClearLog(); for (var i = 0; i < 100; i++) { var parent = await SelectParent25225(context, parentId).SingleAsync(); @@ -202,13 +202,13 @@ async Task QueryAsync(Context25225 context, Guid parentId, Guid collectionId) public virtual async Task Can_query_with_nav_collection_in_projection_with_split_query_in_parallel_sync() { var (context1, context2) = await CreateTwoContext25225(); + ClearLog(); var task1 = Task.Run(() => Query(context1, Context25225.Parent1Id, Context25225.Collection1Id)); var task2 = Task.Run(() => Query(context2, Context25225.Parent2Id, Context25225.Collection2Id)); await Task.WhenAll(task1, task2); void Query(Context25225 context, Guid parentId, Guid collectionId) { - ClearLog(); for (var i = 0; i < 10; i++) { var parent = SelectParent25225(context, parentId).Single();