Skip to content

Remove AccessHelper.clearPersistence() #3416

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 1 commit into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
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 @@ -15,7 +15,6 @@
package com.google.firebase.firestore;

import android.content.Context;
import com.google.android.gms.tasks.Task;
import com.google.firebase.FirebaseApp;
import com.google.firebase.firestore.auth.CredentialsProvider;
import com.google.firebase.firestore.auth.User;
Expand Down Expand Up @@ -50,8 +49,4 @@ public static FirebaseFirestore newFirebaseFirestore(
public static AsyncQueue getAsyncQueue(FirebaseFirestore firestore) {
return firestore.getAsyncQueue();
}

public static Task<Void> clearPersistence(FirebaseFirestore firestore) {
return firestore.clearPersistence();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ public void testCanClearPersistenceAfterRestarting() throws Exception {
waitFor(docRef.set(map("foo", "bar")));
waitFor(firestore.terminate());
IntegrationTestUtil.removeFirestore(firestore);
waitFor(AccessHelper.clearPersistence(firestore));
waitFor(firestore.clearPersistence());

// We restart the app with the same name and options to check that the previous instance's
// persistent storage is actually cleared after the restart. Calling testFirestore() without the
Expand All @@ -1088,7 +1088,7 @@ public void testClearPersistenceWhileRunningFails() {
FirebaseFirestore firestore = testFirestore();
waitFor(firestore.enableNetwork());

Task<Void> transactionTask = AccessHelper.clearPersistence(firestore);
Task<Void> transactionTask = firestore.clearPersistence();
waitForException(transactionTask);
assertFalse(transactionTask.isSuccessful());
Exception e = transactionTask.getException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public static FirebaseFirestore testFirestore(
asyncQueue,
/*firebaseApp=*/ null,
/*instanceRegistry=*/ (dbId) -> {});
waitFor(AccessHelper.clearPersistence(firestore));
waitFor(firestore.clearPersistence());
firestore.setFirestoreSettings(settings);
firestoreStatus.put(firestore, true);

Expand Down