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

Fixing flaky query plan test #3994

Merged
merged 6 commits into from
Aug 2, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
1 sec
  • Loading branch information
SergeyGaluzo committed Jul 31, 2024
commit e43b6a224766b8031621c5dba1d250da5aafef97
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public async Task GivenSearchQuery_IfReuseQueryPlansIsEnabled_ThenPlansAreReused
await ResetQueryStore();
SqlServerSearchService.ResetReuseQueryPlans();
await _fixture.SearchService.SearchAsync(KnownResourceTypes.Patient, [Tuple.Create("address-city", "City1")], CancellationToken.None);
await Task.Delay(1000);
await _fixture.SearchService.SearchAsync(KnownResourceTypes.Patient, [Tuple.Create("address-city", "City2")], CancellationToken.None);
//// values are different but plans are reused
await CheckQueryStore(2, 1);
Expand All @@ -61,6 +62,7 @@ public async Task GivenSearchQuery_IfReuseQueryPlansIsEnabled_ThenPlansAreReused
await ResetQueryStore();
SqlServerSearchService.ResetReuseQueryPlans();
await _fixture.SearchService.SearchAsync(KnownResourceTypes.Patient, [Tuple.Create("address-city", "City1")], CancellationToken.None);
await Task.Delay(1000);
await _fixture.SearchService.SearchAsync(KnownResourceTypes.Patient, [Tuple.Create("address-city", "City2")], CancellationToken.None);
//// values are different and plans are NOT reused
await CheckQueryStore(2, 2);
Expand All @@ -69,6 +71,7 @@ public async Task GivenSearchQuery_IfReuseQueryPlansIsEnabled_ThenPlansAreReused
await ResetQueryStore();
SqlServerSearchService.ResetReuseQueryPlans();
await _fixture.SearchService.SearchAsync(KnownResourceTypes.Patient, [Tuple.Create("address-city", "City1")], CancellationToken.None);
await Task.Delay(1000);
await _fixture.SearchService.SearchAsync(KnownResourceTypes.Patient, [Tuple.Create("address-city", "City1")], CancellationToken.None);
//// values are same and plans are reused
await CheckQueryStore(2, 1);
Expand Down
Loading