Skip to content

Commit 01b70e8

Browse files
authored
Merge pull request #232 from servicetitan/upstream/fix_DelayedQueryTests
Fix IssueJira0546_IncorrectCachingOfQueries tests
2 parents 656509c + 66493b4 commit 01b70e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Orm/Xtensive.Orm.Tests/Issues/IssueJira0546_IncorrectCachingOfQueries.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ public void LoopIndexExecuteDelayedTest()
160160
List<IEnumerable<Location>> queries = new List<IEnumerable<Location>>();
161161
var cachedQueriesCountBefore = Domain.QueryCache.Count;
162162
for (int i = 0; i < upperLimit; i++) {
163-
var locations = session.Query.CreateDelayedQuery(endpoint => from location in session.Query.All<Location>()
163+
var locations = session.Query.CreateDelayedQuery(endpoint => from location in endpoint.All<Location>()
164164
where location.Active && location.Id.In((
165-
from loc in session.Query.All<Location>()
165+
from loc in endpoint.All<Location>()
166166
where loc.Id > i && loc.Zone==null
167167
orderby loc.Id
168168
select loc.Id))
@@ -312,9 +312,9 @@ private void TaskSequencesGenerator(Session session)
312312

313313
private int GetMinimalId(Session session, int startId)
314314
{
315-
var locations = session.Query.CreateDelayedQuery(endpoint => from location in session.Query.All<Location>()
315+
var locations = session.Query.CreateDelayedQuery(endpoint => from location in endpoint.All<Location>()
316316
where location.Active && location.Id.In((
317-
from loc in session.Query.All<Location>()
317+
from loc in endpoint.All<Location>()
318318
where loc.Id > startId && loc.Zone==null
319319
orderby loc.Id
320320
select loc.Id))

0 commit comments

Comments
 (0)