Skip to content

Commit d604be3

Browse files
committed
Fix test: testDocumentTypeIsUpdatedToNoDocumentWhenFoundDocumentDeleted
1 parent 0c3ed8f commit d604be3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -850,13 +850,13 @@ public void testDocumentTypeIsSetToNoDocumentWhenUnknownDocumentDeleted() {
850850

851851
@Test
852852
public void testDocumentTypeIsUpdatedToNoDocumentWhenFoundDocumentDeleted() {
853-
Mutation setMutation = writeMutation(setMutation("coll/a", map("foo", "bar")));
854-
acknowledgeMutation(1);
855-
Mutation deleteMutation = writeMutation(deleteMutation(setMutation.getKey()));
853+
Mutation mutation = writeMutation(setMutation("coll/a", map("foo", "bar")));
856854
acknowledgeMutation(1);
855+
writeMutation(deleteMutation(mutation.getKey()));
856+
acknowledgeMutation(2);
857857

858858
Map<ResourcePath, Integer> expected = new HashMap<>();
859-
expected.put(deleteMutation.getKey().getPath(), 1); // 1 is a "no" document
859+
expected.put(mutation.getKey().getPath(), 1); // 1 is a "no" document
860860
assertThat(getDocumentTypeByPathFromRemoteDocumentsTable()).containsExactlyEntriesIn(expected);
861861
}
862862

0 commit comments

Comments
 (0)