Skip to content

Commit

Permalink
The event-reduce optimization did no longer require to persist for this
Browse files Browse the repository at this point in the history
test case
  • Loading branch information
eliias committed Dec 4, 2023
1 parent fd6a0a0 commit 0b1d6c0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/unit/rx-query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ describe('rx-query.test.ts', () => {

// fill cache
const cache = new Cache();
const query1 = collection.find({});
const query1 = collection.find({limit: 1});
query1.enablePersistentQueryCache(cache);
const queryId = query1.persistentQueryId();

Expand All @@ -1798,14 +1798,11 @@ describe('rx-query.test.ts', () => {
const lwt = now() - 7200 * 1000; // go back in time (2hrs)
await cache.setItem(`qc:${queryId}:lwt`, `${lwt}`);

const query2 = collection.find({});
const query2 = collection.find({limit: 1});
query2.enablePersistentQueryCache(cache);
await query2._persistentQueryCacheLoaded;

await result1[0].modify(data => {
data.age = 40;
return data;
});
await result1[0].remove();

await query2.exec();

Expand Down

0 comments on commit 0b1d6c0

Please sign in to comment.