Skip to content

Clean up and re-enable OR query integration tests. #5346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1579,29 +1579,6 @@ public void testOrQueriesWithIn() {
collection.where(or(equalTo("a", 2), inArray("b", asList(2, 3)))), "doc3", "doc4", "doc6");
}

@Test
public void testOrQueriesWithNotIn() {
assumeTrue(
"Skip this test if running against production because it results in a "
+ "'missing index' error. The Firestore Emulator, however, does serve these "
+ " queries",
isRunningAgainstEmulator());
Map<String, Map<String, Object>> testDocs =
map(
"doc1", map("a", 1, "b", 0),
"doc2", map("b", 1),
"doc3", map("a", 3, "b", 2),
"doc4", map("a", 1, "b", 3),
"doc5", map("a", 1),
"doc6", map("a", 2));
CollectionReference collection = testCollectionWithDocs(testDocs);

// a==2 || b not-in [2,3]
// Has implicit orderBy b.
checkOnlineAndOfflineResultsMatch(
collection.where(or(equalTo("a", 2), notInArray("b", asList(2, 3)))), "doc1", "doc2");
}

@Test
public void testOrQueriesWithArrayMembership() {
Map<String, Map<String, Object>> testDocs =
Expand All @@ -1628,10 +1605,6 @@ public void testOrQueriesWithArrayMembership() {

@Test
public void testMultipleInOps() {
// TODO(orquery): Enable this test against production when possible.
assumeTrue(
"Skip this test if running against production because it's not yet supported.",
isRunningAgainstEmulator());
Map<String, Map<String, Object>> testDocs =
map(
"doc1", map("a", 1, "b", 0),
Expand All @@ -1654,10 +1627,6 @@ public void testMultipleInOps() {

@Test
public void testUsingInWithArrayContainsAny() {
// TODO(orquery): Enable this test against production when possible.
assumeTrue(
"Skip this test if running against production because it's not yet supported.",
isRunningAgainstEmulator());
Map<String, Map<String, Object>> testDocs =
map(
"doc1", map("a", 1, "b", asList(0)),
Expand Down Expand Up @@ -1711,11 +1680,6 @@ public void testUsingInWithArrayContains() {

@Test
public void testOrderByEquality() {
// TODO(orquery): Enable this test against production when possible.
assumeTrue(
"Skip this test if running against production because order-by-equality is "
+ "not supported yet.",
isRunningAgainstEmulator());
Map<String, Map<String, Object>> testDocs =
map(
"doc1", map("a", 1, "b", asList(0)),
Expand Down