Skip to content

Commit 1fe5fe9

Browse files
committed
skip the test while using emulator
1 parent 23e109f commit 1fe5fe9

File tree

1 file changed

+10
-8
lines changed
  • firebase-firestore/src/androidTest/java/com/google/firebase/firestore

1 file changed

+10
-8
lines changed

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/QueryTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414

1515
package com.google.firebase.firestore;
1616

17+
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.isRunningAgainstEmulator;
1718
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.nullList;
1819
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.querySnapshotToIds;
1920
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.querySnapshotToValues;
2021
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.testCollection;
2122
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.testCollectionWithDocs;
2223
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.testFirestore;
2324
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.waitFor;
24-
import static com.google.firebase.firestore.testutil.IntegrationTestUtil.writeAllDocs;
2525
import static com.google.firebase.firestore.testutil.TestUtil.expectError;
2626
import static com.google.firebase.firestore.testutil.TestUtil.map;
27-
import static com.google.firebase.firestore.util.Util.autoId;
2827
import static java.util.Arrays.asList;
2928
import static java.util.Collections.singletonList;
3029
import static org.junit.Assert.assertEquals;
3130
import static org.junit.Assert.assertFalse;
3231
import static org.junit.Assert.assertNull;
3332
import static org.junit.Assert.assertTrue;
33+
import static org.junit.Assume.assumeFalse;
3434

3535
import androidx.test.ext.junit.runners.AndroidJUnit4;
3636
import com.google.android.gms.tasks.Task;
@@ -1035,17 +1035,19 @@ public void testMultipleUpdatesWhileOffline() {
10351035
@Test
10361036
public void resumingQueryShouldRemoveDeletedDocumentsIndicatedByExistenceFilter()
10371037
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+
10381044
Map<String, Map<String, Object>> testData = new HashMap<>();
10391045
for (int i = 1; i <= 100; i++) {
10401046
testData.put("doc" + i, map("key", i));
10411047
}
10421048

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();
10491051

10501052
// Populate the cache and save the resume token.
10511053
QuerySnapshot snapshot1 = waitFor(collection.get());

0 commit comments

Comments
 (0)