Skip to content

Commit df6d3c1

Browse files
authored
Add flaky retry logic for waiting for token in Messaging. (#550)
Sometimes it can take a while to get the token, and the first attempt fails.
1 parent 33a889d commit df6d3c1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

messaging/integration_test/src/integration_test.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,13 @@ TEST_F(FirebaseMessagingTest, TestReceiveToken) {
353353
TEST_REQUIRES_USER_INTERACTION_ON_IOS;
354354

355355
EXPECT_TRUE(RequestPermission());
356+
357+
FLAKY_TEST_SECTION_BEGIN();
358+
356359
EXPECT_TRUE(WaitForToken());
357360
EXPECT_NE(*shared_token_, "");
361+
362+
FLAKY_TEST_SECTION_END();
358363
}
359364

360365
TEST_F(FirebaseMessagingTest, TestSubscribeAndUnsubscribe) {

0 commit comments

Comments
 (0)