From 8bbfd5833b27e75c4f0149263d4fc319f7232016 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 25 Jan 2023 15:18:22 -0800 Subject: [PATCH 1/2] Disable getSessionId test on Android emulator. --- analytics/integration_test/src/integration_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/analytics/integration_test/src/integration_test.cc b/analytics/integration_test/src/integration_test.cc index f9d6ff2d24..2f11451bd3 100644 --- a/analytics/integration_test/src/integration_test.cc +++ b/analytics/integration_test/src/integration_test.cc @@ -107,6 +107,10 @@ TEST_F(FirebaseAnalyticsTest, TestGetAnalyticsInstanceID) { } TEST_F(FirebaseAnalyticsTest, TestGetSessionID) { + // Android emulator tests are currently not working due to getSessionId being + // disabled on virtual FTL devices. + SKIP_TEST_ON_ANDROID_EMULATOR; + // On Android, if SetConsent was tested, this test will fail, since the app // needs to be restarted after consent is denied or it won't generate a new // sessionID. To not break the tests, skip this test in that case. From 9054fe3f5be0e24d988a7ce154599a131070e8a0 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 30 Jan 2023 11:09:55 -0800 Subject: [PATCH 2/2] Also skip on iOS simulator. --- analytics/integration_test/src/integration_test.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/analytics/integration_test/src/integration_test.cc b/analytics/integration_test/src/integration_test.cc index 2f11451bd3..dd825f5f7a 100644 --- a/analytics/integration_test/src/integration_test.cc +++ b/analytics/integration_test/src/integration_test.cc @@ -108,9 +108,14 @@ TEST_F(FirebaseAnalyticsTest, TestGetAnalyticsInstanceID) { TEST_F(FirebaseAnalyticsTest, TestGetSessionID) { // Android emulator tests are currently not working due to getSessionId being - // disabled on virtual FTL devices. + // disabled on virtual FTL devices, due to an older version of Google Play + // services. SKIP_TEST_ON_ANDROID_EMULATOR; + // iOS simulator tests are currently extra flaky, occasionally failing with an + // "Analytics uninitialized" error even after multiple attempts. + SKIP_TEST_ON_IOS_SIMULATOR; + // On Android, if SetConsent was tested, this test will fail, since the app // needs to be restarted after consent is denied or it won't generate a new // sessionID. To not break the tests, skip this test in that case.