Skip to content

Commit e20a275

Browse files
author
Brian Chen
authored
Expose clearPersistence() publicly (#455)
1 parent 59af48c commit e20a275

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

firebase-firestore/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
- [fixed] Updated gRPC to 1.21.0. A bug in the prior version would occasionally
33
cause a crash if a network state change occurred concurrently with an RPC.
44
(#428)
5+
- [feature] Added `clearPersistence()`, which clears the persistent storage
6+
including pending writes and cached documents. This is intended to help
7+
write reliable tests (https://github.com/firebase/firebase-js-sdk/issues/449).
8+
59

610
# 19.0.1
711
- [fixed] Fixed an issue that prevented schema migrations for clients with

firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ public static void setLoggingEnabled(boolean loggingEnabled) {
405405
* @return A Task that is resolved once the persistent storage has been cleared. Otherwise, the
406406
* Task is rejected with an error.
407407
*/
408-
Task<Void> clearPersistence() {
408+
@PublicApi
409+
public Task<Void> clearPersistence() {
409410
final TaskCompletionSource<Void> source = new TaskCompletionSource<>();
410411
asyncQueue.enqueueAndForget(
411412
() -> {

0 commit comments

Comments
 (0)