diff options
author | 2025-02-14 14:32:14 +0000 | |
---|---|---|
committer | 2025-02-17 06:45:35 -0800 | |
commit | 91baa0410a7e939e08ffa7f6021fc0af0224b4c4 (patch) | |
tree | 0d8c17f92fb6bbdeffe98de710dc04371a6d4d8c /tests/hostside | |
parent | fa10363d1d78345cfdeabe9612d968ac8d197a94 (diff) |
Fix flake - not waiting for notification
LOW_COVERAGE_REASON=TEST_ONLY
Bug: 351017432
Test: atest SafetyCenterHostSideTestCases
Relnote: N/A test flake fix
Flag: EXEMPT test flake fix
Change-Id: Ibada243967cca83f040ef5c83b24b73eaf263936
Diffstat (limited to 'tests/hostside')
-rw-r--r-- | tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt b/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt index 60e6e41ec..c56c913b6 100644 --- a/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt +++ b/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt @@ -69,6 +69,12 @@ class SafetyCenterNotificationLoggingHelperTests { @Test fun sendNotification() { safetyCenterTestHelper.setData(SINGLE_SOURCE_ID, newTestDataWithNotifiableIssue()) + TestNotificationListener.waitForSingleNotificationMatching( + NotificationCharacteristics( + actions = listOf("See issue"), + safetySourceId = SINGLE_SOURCE_ID, + ) + ) } @Test @@ -104,7 +110,7 @@ class SafetyCenterNotificationLoggingHelperTests { statusBarNotificationWithChannel.statusBarNotification.notification.contentIntent SafetyCenterActivityLauncher.executeBlockAndExit( launchActivity = { PendingIntentSender.send(contentIntent) }, - block = {} // No action required + block = {}, // No action required ) } } |