Skip to content

Commit 3b53588

Browse files
committed
Make repeating test scheduling and increase timeouts
1 parent d3aec83 commit 3b53588

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

com.unity.mobile.notifications/Tests/Runtime/Android/AndroidNotificationSendingTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public IEnumerator ScheduleRepeatableNotification_NotificationsAreReceived()
149149
var n = new AndroidNotification();
150150
n.Title = "Repeating Notification Title";
151151
n.Text = "Repeating Notification Text";
152-
n.FireTime = System.DateTime.Now;
152+
n.FireTime = System.DateTime.Now.AddSeconds(2);
153153
n.RepeatInterval = new System.TimeSpan(0, 0, 5); // interval needs to be quite big for test to be reliable
154154

155155
Debug.LogWarning("ScheduleRepeatableNotification_NotificationsAreReceived sends notification");
@@ -158,8 +158,8 @@ public IEnumerator ScheduleRepeatableNotification_NotificationsAreReceived()
158158

159159
// we use inexact scheduling, so repeated notification may take a while to appear
160160
// inexact also can group, so for test purposes we only check that it repeats at least once
161-
yield return WaitForNotification(8.0f);
162-
yield return WaitForNotification(30.0f);
161+
yield return WaitForNotification(120.0f);
162+
yield return WaitForNotification(120.0f);
163163
AndroidNotificationCenter.CancelScheduledNotification(originalId);
164164

165165
Debug.LogWarning("ScheduleRepeatableNotification_NotificationsAreReceived completed");

0 commit comments

Comments
 (0)