Skip to content

Commit 72449b2

Browse files
committed
fix flaky osIAMPreview_showsPreview test
Added two threadAndTaskWait() calls just like the other test shouldShowInAppPreviewWhenOpeningPreviewNotification has which seems to be required to ensure it is not flaky due to a number of background task that are kicked off.
1 parent cc997dc commit 72449b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

OneSignalSDK/unittest/src/test/java/com/test/onesignal/NotificationOpenedActivityHMSIntegrationTestsRunner.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ public void osIAMPreview_showsPreview() throws Exception {
200200
);
201201

202202
helper_startHMSOpenActivity(intent);
203+
threadAndTaskWait();
204+
threadAndTaskWait();
203205
assertEquals("PGh0bWw+PC9odG1sPgoKPHNjcmlwdD4KICAgIHNldFBsYXllclRhZ3MobnVsbCk7Cjwvc2NyaXB0Pg==", ShadowOSWebView.lastData);
204206
}
205207
}

0 commit comments

Comments
 (0)