Skip to content

Commit 1972ee1

Browse files
committed
Use limitToLast in some test cases.
1 parent c2bc7a2 commit 1972ee1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,7 @@ public void testPartialIndexAndFullIndex() throws Exception {
10821082
@Test
10831083
public void testIndexTypeForOrQueries() throws Exception {
10841084
indexManager.addFieldIndex(fieldIndex("coll", "a", Kind.ASCENDING));
1085+
indexManager.addFieldIndex(fieldIndex("coll", "a", Kind.DESCENDING));
10851086
indexManager.addFieldIndex(fieldIndex("coll", "b", Kind.ASCENDING));
10861087
indexManager.addFieldIndex(fieldIndex("coll", "b", Kind.ASCENDING, "a", Kind.ASCENDING));
10871088

@@ -1110,7 +1111,7 @@ public void testIndexTypeForOrQueries() throws Exception {
11101111

11111112
// OR query with implicit orderBy with limit which has missing sub-target indexes.
11121113
Query query5 =
1113-
query("coll").filter(orFilters(filter("a", "==", 1), filter("c", ">", 1))).limitToFirst(2);
1114+
query("coll").filter(orFilters(filter("a", "==", 1), filter("c", ">", 1))).limitToLast(2);
11141115
validateIndexType(query5, IndexManager.IndexType.NONE);
11151116

11161117
// OR query without orderBy without limit which has all sub-target indexes.
@@ -1143,7 +1144,7 @@ public void testIndexTypeForOrQueries() throws Exception {
11431144

11441145
// OR query with implicit orderBy with limit which has all sub-target indexes.
11451146
Query query11 =
1146-
query("coll").filter(orFilters(filter("a", ">", 1), filter("b", "==", 1))).limitToFirst(2);
1147+
query("coll").filter(orFilters(filter("a", ">", 1), filter("b", "==", 1))).limitToLast(2);
11471148
validateIndexType(query11, IndexManager.IndexType.PARTIAL);
11481149
}
11491150

0 commit comments

Comments
 (0)