File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
OneSignalSDK/unittest/src/test/java/com/test/onesignal Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1340,7 +1340,15 @@ public void testInAppMessageDisplayMultipleTimes_sessionDurationTrigger() throws
1340
1340
threadAndTaskWait ();
1341
1341
1342
1342
// No schedule should happen, IAM should evaluate to true
1343
- assertEquals (1 , OneSignalPackagePrivateHelper .getInAppMessageDisplayQueue ().size ());
1343
+ Awaitility .await ()
1344
+ .atMost (new Duration (1_000 , TimeUnit .MILLISECONDS ))
1345
+ .pollInterval (new Duration (10 , TimeUnit .MILLISECONDS ))
1346
+ .untilAsserted (new ThrowingRunnable () {
1347
+ @ Override
1348
+ public void run () throws Exception {
1349
+ assertEquals (1 , OneSignalPackagePrivateHelper .getInAppMessageDisplayQueue ().size ());
1350
+ }
1351
+ });
1344
1352
1345
1353
// After IAM is added to display queue we now need to wait until it is shown
1346
1354
Awaitility .await ()
@@ -1378,7 +1386,7 @@ public void run() throws Exception {
1378
1386
// No schedule should happen since session time period is very small, should evaluate to true on first run
1379
1387
// Wait for redisplay logic
1380
1388
Awaitility .await ()
1381
- .atMost (new Duration (150 , TimeUnit .MILLISECONDS ))
1389
+ .atMost (new Duration (1_000 , TimeUnit .MILLISECONDS ))
1382
1390
.pollInterval (new Duration (10 , TimeUnit .MILLISECONDS ))
1383
1391
.untilAsserted (new ThrowingRunnable () {
1384
1392
@ Override
You can’t perform that action at this time.
0 commit comments