-
Notifications
You must be signed in to change notification settings - Fork 898
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
Mila/bloom filter add integration test #7045
Mila/bloom filter add integration test #7045
Conversation
|
Size Report 1Affected ProductsNo changes between base commit (b7072d1) and merge commit (bf8dad4).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (b7072d1) and merge commit (193d47a).Test Logs |
|
||
// eslint-disable-next-line no-restricted-properties | ||
(persistence ? it.skip : it)( | ||
'can raise expected snapshot when resume query after deleting docs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming this test to something like "resuming a query should remove deleted documents indicated by existence filter"
() => { | ||
const testDocs = {}; | ||
for (let i = 1; i <= 100; i++) { | ||
Object.assign(testDocs, { ['doc' + i]: { key: i } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can
Object.assign(testDocs, { ['doc' + i]: { key: i } })
be simplified to
testDocs['doc' + i] = { key: i }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can convince TypeScript to be happy. Does this work:
Change
const testDocs = {};
to
const testDocs: { [key: string]: Object } = {};
txn.delete(doc(coll, 'doc' + i)); | ||
} | ||
}); | ||
// Wait 10 seconds, during which the watch will stop tracking the query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "the watch" -> "Watch" (with a capital "W")
}); | ||
// Wait 10 seconds, during which the watch will stop tracking the query | ||
// and will send an existence filter rather than "delete" events. | ||
await (function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can
await (function () {
return new Promise(resolve => setTimeout(resolve, 10000));
})();
be simplified to
await new Promise(resolve => setTimeout(resolve, 10000));
Integration Test 1 - Typical Case