@@ -1076,10 +1076,7 @@ function genericLocalStoreTests(
1076
1076
] ) ;
1077
1077
} ) ;
1078
1078
1079
- // TODO(schmidt-sebastian): This test makes idempotency testing harder.
1080
- // Comment back in when done with the idempotent migration.
1081
- // eslint-disable-next-line no-restricted-properties
1082
- it . skip ( 'reads all documents for initial collection queries' , ( ) => {
1079
+ it ( 'reads all documents for initial collection queries' , ( ) => {
1083
1080
const firstQuery = Query . atPath ( path ( 'foo' ) ) ;
1084
1081
const secondQuery = Query . atPath ( path ( 'foo' ) ) . addFilter (
1085
1082
filter ( 'matches' , '==' , true )
@@ -1483,55 +1480,55 @@ function genericLocalStoreTests(
1483
1480
) ;
1484
1481
} ) ;
1485
1482
1486
- // TODO(schmidt-sebastian): This test makes idempotency testing harder.
1487
- // Comment back in when done with the idempotent migration.
1488
- // (queryEngine instanceof IndexFreeQueryEngine && !gcIsEager ? it : it.skip)(
1489
1483
// eslint-disable-next-line no-restricted-properties
1490
- it . skip ( 'uses target mapping to execute queries' , ( ) => {
1491
- // This test verifies that once a target mapping has been written, only
1492
- // documents that match the query are read from the RemoteDocumentCache.
1484
+ ( queryEngine instanceof IndexFreeQueryEngine && ! gcIsEager ? it : it . skip ) (
1485
+ 'uses target mapping to execute queries' ,
1486
+ ( ) => {
1487
+ // This test verifies that once a target mapping has been written, only
1488
+ // documents that match the query are read from the RemoteDocumentCache.
1493
1489
1494
- const query = Query . atPath ( path ( 'foo' ) ) . addFilter (
1495
- filter ( 'matches' , '==' , true )
1496
- ) ;
1497
- return (
1498
- expectLocalStore ( )
1499
- . afterAllocatingQuery ( query )
1500
- . toReturnTargetId ( 2 )
1501
- . after ( setMutation ( 'foo/a' , { matches : true } ) )
1502
- . after ( setMutation ( 'foo/b' , { matches : true } ) )
1503
- . after ( setMutation ( 'foo/ignored' , { matches : false } ) )
1504
- . afterAcknowledgingMutation ( { documentVersion : 10 } )
1505
- . afterAcknowledgingMutation ( { documentVersion : 10 } )
1506
- . afterAcknowledgingMutation ( { documentVersion : 10 } )
1507
- . afterExecutingQuery ( query )
1508
- // Execute the query, but note that we read all existing documents
1509
- // from the RemoteDocumentCache since we do not yet have target
1510
- // mapping.
1511
- . toHaveRead ( { documentsByQuery : 2 } )
1512
- . after (
1513
- docAddedRemoteEvent (
1514
- [
1515
- doc ( 'foo/a' , 10 , { matches : true } ) ,
1516
- doc ( 'foo/b' , 10 , { matches : true } )
1517
- ] ,
1518
- [ 2 ] ,
1519
- [ ]
1490
+ const query = Query . atPath ( path ( 'foo' ) ) . addFilter (
1491
+ filter ( 'matches' , '==' , true )
1492
+ ) ;
1493
+ return (
1494
+ expectLocalStore ( )
1495
+ . afterAllocatingQuery ( query )
1496
+ . toReturnTargetId ( 2 )
1497
+ . after ( setMutation ( 'foo/a' , { matches : true } ) )
1498
+ . after ( setMutation ( 'foo/b' , { matches : true } ) )
1499
+ . after ( setMutation ( 'foo/ignored' , { matches : false } ) )
1500
+ . afterAcknowledgingMutation ( { documentVersion : 10 } )
1501
+ . afterAcknowledgingMutation ( { documentVersion : 10 } )
1502
+ . afterAcknowledgingMutation ( { documentVersion : 10 } )
1503
+ . afterExecutingQuery ( query )
1504
+ // Execute the query, but note that we read all existing documents
1505
+ // from the RemoteDocumentCache since we do not yet have target
1506
+ // mapping.
1507
+ . toHaveRead ( { documentsByQuery : 2 } )
1508
+ . after (
1509
+ docAddedRemoteEvent (
1510
+ [
1511
+ doc ( 'foo/a' , 10 , { matches : true } ) ,
1512
+ doc ( 'foo/b' , 10 , { matches : true } )
1513
+ ] ,
1514
+ [ 2 ] ,
1515
+ [ ]
1516
+ )
1520
1517
)
1521
- )
1522
- . after (
1523
- noChangeEvent ( /* targetId= */ 2 , /* snapshotVersion= */ 10 , 'foo' )
1524
- )
1525
- . after ( localViewChanges ( 2 , /* fromCache= */ false , { } ) )
1526
- . afterExecutingQuery ( query )
1527
- . toHaveRead ( { documentsByKey : 2 , documentsByQuery : 0 } )
1528
- . toReturnChanged (
1529
- doc ( 'foo/a ' , 10 , { matches : true } ) ,
1530
- doc ( 'foo/b' , 10 , { matches : true } )
1531
- )
1532
- . finish ( )
1533
- ) ;
1534
- } ) ;
1518
+ . after (
1519
+ noChangeEvent ( /* targetId= */ 2 , /* snapshotVersion= */ 10 , 'foo' )
1520
+ )
1521
+ . after ( localViewChanges ( 2 , /* fromCache= */ false , { } ) )
1522
+ . afterExecutingQuery ( query )
1523
+ . toHaveRead ( { documentsByKey : 2 , documentsByQuery : 0 } )
1524
+ . toReturnChanged (
1525
+ doc ( 'foo/a' , 10 , { matches : true } ) ,
1526
+ doc ( 'foo/b ' , 10 , { matches : true } )
1527
+ )
1528
+ . finish ( )
1529
+ ) ;
1530
+ }
1531
+ ) ;
1535
1532
1536
1533
it ( 'last limbo free snapshot is advanced during view processing' , async ( ) => {
1537
1534
// This test verifies that the `lastLimboFreeSnapshot` version for QueryData
0 commit comments