@@ -249,22 +249,25 @@ public void testHandlesSetMutationThenAckThenRelease() {
249
249
allocateQuery (query );
250
250
251
251
writeMutation (setMutation ("foo/bar" , map ("foo" , "bar" )));
252
+ notifyLocalViewChanges (viewChanges (2 , asList ("foo/bar" ), emptyList ()));
253
+
252
254
assertChanged (doc ("foo/bar" , 0 , map ("foo" , "bar" ), Document .DocumentState .LOCAL_MUTATIONS ));
253
255
assertContains (doc ("foo/bar" , 0 , map ("foo" , "bar" ), Document .DocumentState .LOCAL_MUTATIONS ));
254
256
255
257
acknowledgeMutation (1 );
256
- notifyLocalViewChanges (viewChanges (2 , asList ("foo/bar" ), emptyList ()));
257
258
258
259
assertChanged (doc ("foo/bar" , 1 , map ("foo" , "bar" ), Document .DocumentState .COMMITTED_MUTATIONS ));
259
- assertContains (doc ("foo/bar" , 1 , map ("foo" , "bar" ), Document .DocumentState .COMMITTED_MUTATIONS ));
260
+ assertContains (
261
+ doc ("foo/bar" , 1 , map ("foo" , "bar" ), Document .DocumentState .COMMITTED_MUTATIONS ));
260
262
261
263
releaseQuery (query );
262
264
263
265
// It has been acknowledged, and should no longer be retained as there is no target and mutation
264
266
if (garbageCollectorIsEager ()) {
265
267
assertNotContains ("foo/bar" );
266
268
} else {
267
- assertContains (doc ("foo/bar" , 0 , map ("foo" , "bar" ), Document .DocumentState .COMMITTED_MUTATIONS ));
269
+ assertContains (
270
+ doc ("foo/bar" , 1 , map ("foo" , "bar" ), Document .DocumentState .COMMITTED_MUTATIONS ));
268
271
}
269
272
}
270
273
0 commit comments