File tree 4 files changed +1288
-220
lines changed
firebase-firestore/src/test/resources/json
4 files changed +1288
-220
lines changed Original file line number Diff line number Diff line change 541
541
}
542
542
]
543
543
},
544
+ "Doesn't raise 'hasPendingWrites' for deletes" : {
545
+ "describeName" : " Listens:" ,
546
+ "itName" : " Doesn't raise 'hasPendingWrites' for deletes" ,
547
+ "tags" : [],
548
+ "config" : {
549
+ "useGarbageCollection" : true ,
550
+ "numClients" : 1
551
+ },
552
+ "steps" : [
553
+ {
554
+ "userListen" : [
555
+ 2 ,
556
+ {
557
+ "path" : " collection" ,
558
+ "filters" : [],
559
+ "orderBys" : []
560
+ }
561
+ ],
562
+ "stateExpect" : {
563
+ "activeTargets" : {
564
+ "2" : {
565
+ "query" : {
566
+ "path" : " collection" ,
567
+ "filters" : [],
568
+ "orderBys" : []
569
+ },
570
+ "resumeToken" : " "
571
+ }
572
+ }
573
+ }
574
+ },
575
+ {
576
+ "watchAck" : [
577
+ 2
578
+ ]
579
+ },
580
+ {
581
+ "watchEntity" : {
582
+ "docs" : [
583
+ {
584
+ "key" : " collection/a" ,
585
+ "version" : 0 ,
586
+ "value" : {
587
+ "key" : " a"
588
+ },
589
+ "options" : {
590
+ "hasLocalMutations" : false ,
591
+ "hasCommittedMutations" : false
592
+ }
593
+ }
594
+ ],
595
+ "targets" : [
596
+ 2
597
+ ]
598
+ }
599
+ },
600
+ {
601
+ "watchCurrent" : [
602
+ [
603
+ 2
604
+ ],
605
+ " resume-token-1000"
606
+ ]
607
+ },
608
+ {
609
+ "watchSnapshot" : {
610
+ "version" : 1000 ,
611
+ "targetIds" : []
612
+ },
613
+ "expect" : [
614
+ {
615
+ "query" : {
616
+ "path" : " collection" ,
617
+ "filters" : [],
618
+ "orderBys" : []
619
+ },
620
+ "added" : [
621
+ {
622
+ "key" : " collection/a" ,
623
+ "version" : 0 ,
624
+ "value" : {
625
+ "key" : " a"
626
+ },
627
+ "options" : {
628
+ "hasLocalMutations" : false ,
629
+ "hasCommittedMutations" : false
630
+ }
631
+ }
632
+ ],
633
+ "errorCode" : 0 ,
634
+ "fromCache" : false ,
635
+ "hasPendingWrites" : false
636
+ }
637
+ ]
638
+ },
639
+ {
640
+ "userDelete" : " collection/a" ,
641
+ "expect" : [
642
+ {
643
+ "query" : {
644
+ "path" : " collection" ,
645
+ "filters" : [],
646
+ "orderBys" : []
647
+ },
648
+ "removed" : [
649
+ {
650
+ "key" : " collection/a" ,
651
+ "version" : 0 ,
652
+ "value" : {
653
+ "key" : " a"
654
+ },
655
+ "options" : {
656
+ "hasLocalMutations" : false ,
657
+ "hasCommittedMutations" : false
658
+ }
659
+ }
660
+ ],
661
+ "errorCode" : 0 ,
662
+ "fromCache" : false ,
663
+ "hasPendingWrites" : false
664
+ }
665
+ ]
666
+ },
667
+ {
668
+ "writeAck" : {
669
+ "version" : 2000
670
+ },
671
+ "stateExpect" : {
672
+ "userCallbacks" : {
673
+ "acknowledgedDocs" : [
674
+ " collection/a"
675
+ ],
676
+ "rejectedDocs" : []
677
+ }
678
+ }
679
+ },
680
+ {
681
+ "watchEntity" : {
682
+ "docs" : [
683
+ {
684
+ "key" : " collection/a" ,
685
+ "version" : 2000 ,
686
+ "value" : null
687
+ }
688
+ ],
689
+ "targets" : [
690
+ 2
691
+ ]
692
+ }
693
+ },
694
+ {
695
+ "watchSnapshot" : {
696
+ "version" : 2000 ,
697
+ "targetIds" : []
698
+ }
699
+ }
700
+ ]
701
+ },
544
702
"Ensure correct query results with latency-compensated deletes" : {
545
703
"describeName" : " Listens:" ,
546
704
"itName" : " Ensure correct query results with latency-compensated deletes" ,
2838
2996
"docs" : [
2839
2997
{
2840
2998
"key" : " collection/a" ,
2841
- "version" : 4000 ,
2999
+ "version" : 3000 ,
2842
3000
"value" : {
2843
3001
"v" : " 3"
2844
3002
},
Original file line number Diff line number Diff line change 30
30
}
31
31
}
32
32
},
33
- {
34
- "watchStreamClose" : {
35
- "error" : {
36
- "code" : 14 ,
37
- "message" : " Simulated Backend Error"
38
- },
39
- "runBackoffTimer" : true
40
- }
41
- },
42
33
{
43
34
"watchStreamClose" : {
44
35
"error" : {
125
116
"runBackoffTimer" : true
126
117
}
127
118
},
128
- {
129
- "watchStreamClose" : {
130
- "error" : {
131
- "code" : 14 ,
132
- "message" : " Simulated Backend Error"
133
- },
134
- "runBackoffTimer" : true
135
- }
136
- },
137
119
{
138
120
"watchStreamClose" : {
139
121
"error" : {
209
191
}
210
192
}
211
193
},
212
- {
213
- "watchStreamClose" : {
214
- "error" : {
215
- "code" : 14 ,
216
- "message" : " Simulated Backend Error"
217
- },
218
- "runBackoffTimer" : true
219
- }
220
- },
221
194
{
222
195
"watchStreamClose" : {
223
196
"error" : {
283
256
}
284
257
}
285
258
},
286
- {
287
- "watchStreamClose" : {
288
- "error" : {
289
- "code" : 14 ,
290
- "message" : " Simulated Backend Error"
291
- },
292
- "runBackoffTimer" : true
293
- }
294
- },
295
259
{
296
260
"watchStreamClose" : {
297
261
"error" : {
431
395
}
432
396
}
433
397
},
434
- {
435
- "watchStreamClose" : {
436
- "error" : {
437
- "code" : 14 ,
438
- "message" : " Simulated Backend Error"
439
- },
440
- "runBackoffTimer" : true
441
- }
442
- },
443
398
{
444
399
"watchStreamClose" : {
445
400
"error" : {
689
644
"runBackoffTimer" : true
690
645
}
691
646
},
692
- {
693
- "watchStreamClose" : {
694
- "error" : {
695
- "code" : 14 ,
696
- "message" : " Simulated Backend Error"
697
- },
698
- "runBackoffTimer" : true
699
- }
700
- },
701
647
{
702
648
"watchAck" : [
703
649
2
992
938
}
993
939
}
994
940
},
995
- {
996
- "watchStreamClose" : {
997
- "error" : {
998
- "code" : 14 ,
999
- "message" : " Simulated Backend Error"
1000
- },
1001
- "runBackoffTimer" : true
1002
- }
1003
- },
1004
941
{
1005
942
"watchStreamClose" : {
1006
943
"error" : {
1159
1096
"Queries return from cache when network disabled" : {
1160
1097
"describeName" : " Offline:" ,
1161
1098
"itName" : " Queries return from cache when network disabled" ,
1162
- "tags" : [" eager-gc" ],
1099
+ "tags" : [
1100
+ " eager-gc"
1101
+ ],
1163
1102
"config" : {
1164
1103
"useGarbageCollection" : true ,
1165
1104
"numClients" : 1
Original file line number Diff line number Diff line change 555
555
"message" : " Simulated Backend Error"
556
556
},
557
557
"runBackoffTimer" : true
558
- }
558
+ },
559
+ "expect" : [
560
+ {
561
+ "query" : {
562
+ "path" : " collection" ,
563
+ "filters" : [],
564
+ "orderBys" : []
565
+ },
566
+ "errorCode" : 0 ,
567
+ "fromCache" : true ,
568
+ "hasPendingWrites" : false
569
+ }
570
+ ]
559
571
},
560
572
{
561
573
"watchAck" : [
665
677
},
666
678
"runBackoffTimer" : false
667
679
},
680
+ "expect" : [
681
+ {
682
+ "query" : {
683
+ "path" : " collection" ,
684
+ "filters" : [],
685
+ "orderBys" : []
686
+ },
687
+ "errorCode" : 0 ,
688
+ "fromCache" : true ,
689
+ "hasPendingWrites" : false
690
+ }
691
+ ],
668
692
"stateExpect" : {
669
693
"activeTargets" : {}
670
694
}
You can’t perform that action at this time.
0 commit comments