From cfe324d504eab498dab25154dafe1297631fa617 Mon Sep 17 00:00:00 2001 From: Russell Wheatley Date: Thu, 7 Nov 2024 07:52:31 +0000 Subject: [PATCH] test: skip flakey subscribe to topic tests + sessionId() for iOS on CI (#13689) * test(messaging): skip subscribe to topic tests on CI * test: skip getSessionId on CI for iOS --- .../firebase_analytics_e2e_test.dart | 4 ++++ .../firebase_messaging_e2e_test.dart | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart b/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart index dc53117841ef..acb136e6a27f 100644 --- a/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart +++ b/tests/integration_test/firebase_analytics/firebase_analytics_e2e_test.dart @@ -9,6 +9,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:tests/firebase_options.dart'; +// ignore: do_not_use_environment +const bool skipTestsOnCI = bool.fromEnvironment('CI'); + void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -40,6 +43,7 @@ void main() { expect(result, isA()); } }, + skip: skipTestsOnCI && defaultTargetPlatform == TargetPlatform.iOS, ); test('isSupported', () async { diff --git a/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart b/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart index 30aa793861c1..0db22fb77531 100644 --- a/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart +++ b/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart @@ -178,9 +178,8 @@ void main() { }, // macOS skipped because it needs keychain sharing entitlement. See: https://github.com/firebase/flutterfire/issues/9538 // android skipped due to consistently failing, works locally: https://github.com/firebase/flutterfire/pull/11260 - skip: kIsWeb || - defaultTargetPlatform == TargetPlatform.macOS || - defaultTargetPlatform == TargetPlatform.android, + // iOS fails because APNS token handler doesn't have a chance to receive token before calling this method + skip: kIsWeb || skipTestsOnCI, ); }); @@ -193,9 +192,8 @@ void main() { }, // macOS skipped because it needs keychain sharing entitlement. See: https://github.com/firebase/flutterfire/issues/9538 // android skipped due to consistently failing, works locally: https://github.com/firebase/flutterfire/pull/11260 - skip: kIsWeb || - defaultTargetPlatform == TargetPlatform.macOS || - defaultTargetPlatform == TargetPlatform.android, + // iOS fails because APNS token handler doesn't have a chance to receive token before calling this method + skip: kIsWeb || skipTestsOnCI, ); });