@@ -23,7 +23,7 @@ import { describeSpec, specTest } from './describe_spec';
23
23
import { spec } from './spec_builder' ;
24
24
import { RpcError } from './spec_rpc_error' ;
25
25
26
- describeSpec ( 'Existence Filters:' , [ 'exclusive' ] , ( ) => {
26
+ describeSpec ( 'Existence Filters:' , [ ] , ( ) => {
27
27
specTest ( 'Existence filter match' , [ ] , ( ) => {
28
28
const query1 = query ( 'collection' ) ;
29
29
const doc1 = doc ( 'collection/1' , 1000 , { v : 1 } ) ;
@@ -35,18 +35,20 @@ describeSpec('Existence Filters:', ['exclusive'], () => {
35
35
. watchSnapshots ( 2000 ) ;
36
36
} ) ;
37
37
38
- // TODO:(mila) update the tests when bloom filter is
39
- specTest ( 'Existence filter with bloom filter match' , [ 'exclusive' ] , ( ) => {
38
+ // This test is only to make sure watchFilters can accept bloom filter.
39
+ // TODO:(mila) update the tests when bloom filter logic is implemented.
40
+ specTest ( 'Existence filter with bloom filter match' , [ ] , ( ) => {
40
41
const query1 = query ( 'collection' ) ;
41
42
const doc1 = doc ( 'collection/1' , 1000 , { v : 1 } ) ;
42
43
return spec ( )
43
44
. userListens ( query1 )
44
45
. watchAcksFull ( query1 , 1000 , doc1 )
45
46
. expectEvents ( query1 , { added : [ doc1 ] } )
46
- . watchFilters ( [ query1 ] , [ doc1 . key ] , { bits :{ bitmap :"a" , padding :1 } , hashCount :1 } )
47
- . watchSnapshots ( 2000 )
48
- . watchFilters ( [ query1 ] )
49
- . watchSnapshots ( 3000 ) ;
47
+ . watchFilters ( [ query1 ] , [ doc1 . key ] , {
48
+ bits : { bitmap : 'a' , padding : 1 } ,
49
+ hashCount : 1
50
+ } )
51
+ . watchSnapshots ( 2000 ) ;
50
52
} ) ;
51
53
52
54
specTest ( 'Existence filter match after pending update' , [ ] , ( ) => {
@@ -126,8 +128,9 @@ describeSpec('Existence Filters:', ['exclusive'], () => {
126
128
) ;
127
129
} ) ;
128
130
129
- // todo
130
- specTest ( 'Existence filter mismatch triggers bloom filter' , [ 'exclusive' ] , ( ) => {
131
+ // This test is only to make sure watchFilters can accept bloom filter.
132
+ // TODO:(mila) update the tests when bloom filter logic is implemented.
133
+ specTest ( 'Existence filter mismatch triggers bloom filter' , [ ] , ( ) => {
131
134
const query1 = query ( 'collection' ) ;
132
135
const doc1 = doc ( 'collection/1' , 1000 , { v : 1 } ) ;
133
136
const doc2 = doc ( 'collection/2' , 1000 , { v : 2 } ) ;
@@ -136,7 +139,10 @@ describeSpec('Existence Filters:', ['exclusive'], () => {
136
139
. userListens ( query1 )
137
140
. watchAcksFull ( query1 , 1000 , doc1 , doc2 )
138
141
. expectEvents ( query1 , { added : [ doc1 , doc2 ] } )
139
- . watchFilters ( [ query1 ] , [ doc1 . key ] , { bits :{ bitmap :"a" , padding :1 } , hashCount :3 } ) // in the next sync doc2 was deleted
142
+ . watchFilters ( [ query1 ] , [ doc1 . key ] , {
143
+ bits : { bitmap : 'a' , padding : 1 } ,
144
+ hashCount : 3
145
+ } ) // in the next sync doc2 was deleted
140
146
. watchSnapshots ( 2000 )
141
147
// query is now marked as "inconsistent" because of filter mismatch
142
148
. expectEvents ( query1 , { fromCache : true } )
0 commit comments