|
14 | 14 |
|
15 | 15 | package com.google.firebase.firestore; |
16 | 16 |
|
| 17 | +import static com.google.firebase.firestore.testutil.IntegrationTestUtil.isRunningAgainstEmulator; |
17 | 18 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.nullList; |
18 | 19 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.querySnapshotToIds; |
19 | 20 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.querySnapshotToValues; |
20 | 21 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.testCollection; |
21 | 22 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.testCollectionWithDocs; |
22 | 23 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.testFirestore; |
23 | 24 | import static com.google.firebase.firestore.testutil.IntegrationTestUtil.waitFor; |
24 | | -import static com.google.firebase.firestore.testutil.IntegrationTestUtil.writeAllDocs; |
25 | 25 | import static com.google.firebase.firestore.testutil.TestUtil.expectError; |
26 | 26 | import static com.google.firebase.firestore.testutil.TestUtil.map; |
27 | | -import static com.google.firebase.firestore.util.Util.autoId; |
28 | 27 | import static java.util.Arrays.asList; |
29 | 28 | import static java.util.Collections.singletonList; |
30 | 29 | import static org.junit.Assert.assertEquals; |
31 | 30 | import static org.junit.Assert.assertFalse; |
32 | 31 | import static org.junit.Assert.assertNull; |
33 | 32 | import static org.junit.Assert.assertTrue; |
| 33 | +import static org.junit.Assume.assumeFalse; |
34 | 34 |
|
35 | 35 | import androidx.test.ext.junit.runners.AndroidJUnit4; |
36 | 36 | import com.google.android.gms.tasks.Task; |
@@ -1035,17 +1035,19 @@ public void testMultipleUpdatesWhileOffline() { |
1035 | 1035 | @Test |
1036 | 1036 | public void resumingQueryShouldRemoveDeletedDocumentsIndicatedByExistenceFilter() |
1037 | 1037 | throws InterruptedException { |
| 1038 | + // TODO(Mila):Remove this condition once the bug is resolved. |
| 1039 | + assumeFalse( |
| 1040 | + "Skip this test when running against the Firestore emulator as there is a bug related to " |
| 1041 | + + "sending existence filter in response: b/270731363.", |
| 1042 | + isRunningAgainstEmulator()); |
| 1043 | + |
1038 | 1044 | Map<String, Map<String, Object>> testData = new HashMap<>(); |
1039 | 1045 | for (int i = 1; i <= 100; i++) { |
1040 | 1046 | testData.put("doc" + i, map("key", i)); |
1041 | 1047 | } |
1042 | 1048 |
|
1043 | | - // Setup firestore with disabled persistence and populate a collection with testDocs. |
1044 | | - FirebaseFirestore firestore = testFirestore(); |
1045 | | - firestore.setFirestoreSettings( |
1046 | | - new FirebaseFirestoreSettings.Builder().setPersistenceEnabled(false).build()); |
1047 | | - CollectionReference collection = firestore.collection(autoId()); |
1048 | | - writeAllDocs(collection, testData); |
| 1049 | + CollectionReference collection = testCollectionWithDocs(testData); |
| 1050 | + FirebaseFirestore firestore = collection.getFirestore(); |
1049 | 1051 |
|
1050 | 1052 | // Populate the cache and save the resume token. |
1051 | 1053 | QuerySnapshot snapshot1 = waitFor(collection.get()); |
|
0 commit comments