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

The event-reduce optimization made the test fail (modify no longer requires persistence) #11

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
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
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
Loading