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.
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.
Can
Object.assign(testDocs, { ['doc' + i]: { key: i } })be simplified to
testDocs['doc' + i] = { key: i }There was a problem hiding this comment.
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.
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.
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