Skip to content

Commit 01f0fdf

Browse files
Fix
1 parent 97faab1 commit 01f0fdf

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/local/DocumentOverlayCache.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ public interface DocumentOverlayCache {
6060
/**
6161
* Returns {@code count} overlays with a batch ID higher than {@code sinceBatchId} for the
6262
* provided collection group, processed by ascending batch ID. The method always returns all
63-
* overlays for a batch even if a batch contains more documents than the remaining limit.
63+
* overlays for a batch even if the last batch contains more documents than the remaining limit.
6464
*
6565
* @param collectionGroup The collection group to get the overlays for.
6666
* @param sinceBatchId The minimum batch ID to filter by (exclusive). Only overlays that contain a
6767
* change past `sinceBatchId` are returned.
68+
* @param count The number of overlays to return. Can be exceeded if the last batch contains more
69+
* entries.
6870
* @return Mapping of each document key in the collection group to its overlay.
6971
*/
7072
Map<DocumentKey, Overlay> getOverlays(String collectionGroup, int sinceBatchId, int count);

firebase-firestore/src/test/java/com/google/firebase/firestore/local/DocumentOverlayCacheTestCase.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ public void testGetAllOverlaysSinceBatchId() {
153153
verifyOverlayContains(overlays, "coll/doc3", "coll/doc4");
154154
}
155155

156-
<<<<<<< HEAD
157156
@Test
158157
public void testGetAllOverlaysFromCollectionGroupEnforcesCollectionGroup() {
159158
saveOverlays(2, "coll1/doc1", "coll2/doc1");
@@ -192,8 +191,6 @@ public void testGetAllOverlaysFromCollectionGroupWithLimitIncludesFullBatches()
192191
verifyOverlayContains(overlays, "coll/doc1", "coll/doc2", "coll/doc3");
193192
}
194193

195-
=======
196-
>>>>>>> @{-1}
197194
void verifyOverlayContains(Map<DocumentKey, Overlay> overlays, String... keys) {
198195
Set<DocumentKey> expected = Arrays.stream(keys).map(TestUtil::key).collect(Collectors.toSet());
199196
assertThat(overlays.keySet()).containsExactlyElementsIn(expected);

0 commit comments

Comments
 (0)