Skip to content

Commit 6bd8cf8

Browse files
authored
Port cl/361880889: Uncomment RestartFirestoreLeadsToNewInstance for Android now that auth is a soft dependency (#334)
1 parent 98c584c commit 6bd8cf8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

firestore/integration_test_internal/src/firestore_test.cc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,24 +1269,16 @@ TEST_F(FirestoreIntegrationTest, MaintainsPersistenceAfterRestarting) {
12691269
EXPECT_TRUE(snap->exists());
12701270
}
12711271

1272-
// TODO(b/173730469) Enable this test on Android once the Auth issue is fixed.
1273-
#if !defined(__ANDROID__)
12741272
TEST_F(FirestoreIntegrationTest, RestartFirestoreLeadsToNewInstance) {
12751273
// Get App and Settings objects to use in the test.
12761274
Firestore* db_template = TestFirestore("restart_firestore_new_instance_test");
12771275
App* app = db_template->app();
12781276
Settings settings = db_template->settings();
12791277
DeleteFirestore(db_template);
12801278

1281-
// Get the Auth object so that it can be explicitly deleted to avoid a leak.
1282-
// This memory leak avoidance hack can be removed once Auth becomes a soft
1283-
// dependency (b/147772264).
1284-
InitResult init_result;
1285-
Auth* auth = Auth::GetAuth(app, &init_result);
1286-
ASSERT_EQ(kInitResultSuccess, init_result);
1287-
12881279
// Verify that GetInstance() returns the same instance when specified the same
12891280
// App.
1281+
InitResult init_result;
12901282
Firestore* db1 = Firestore::GetInstance(app, &init_result);
12911283
ASSERT_EQ(kInitResultSuccess, init_result);
12921284
Firestore* db1_copy = Firestore::GetInstance(app, &init_result);
@@ -1318,9 +1310,7 @@ TEST_F(FirestoreIntegrationTest, RestartFirestoreLeadsToNewInstance) {
13181310

13191311
delete db2;
13201312
delete db1;
1321-
delete auth;
13221313
}
1323-
#endif // if !defined(__ANDROID__)
13241314

13251315
TEST_F(FirestoreIntegrationTest, CanStopListeningAfterTerminate) {
13261316
auto instance = TestFirestore();

0 commit comments

Comments
 (0)