File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
OneSignalSDK/unittest/src/test/java/com/test/onesignal Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1252,15 +1252,15 @@ public void shouldSetExpireTimeCorrectlyFromGoogleTTL() throws Exception {
1252
1252
@ Test
1253
1253
@ Config (sdk = 23 , shadows = { ShadowGenerateNotification .class })
1254
1254
public void notShowNotificationPastTTL () throws Exception {
1255
- long sentTime = time .getCurrentThreadTimeMillis ();
1255
+ long sentTime = time .getCurrentTimeMillis ();
1256
1256
long ttl = 60L ;
1257
1257
1258
1258
Bundle bundle = getBaseNotifBundle ();
1259
1259
bundle .putLong (OneSignalPackagePrivateHelper .GOOGLE_SENT_TIME_KEY , sentTime );
1260
1260
bundle .putLong (OneSignalPackagePrivateHelper .GOOGLE_TTL_KEY , ttl );
1261
1261
1262
1262
// Go forward just past the TTL of the notification
1263
- time .advanceThreadTimeBy (ttl + 1 );
1263
+ time .advanceSystemTimeBy (ttl + 1 );
1264
1264
1265
1265
NotificationBundleProcessor_ProcessFromFCMIntentService (blankActivity , bundle );
1266
1266
threadAndTaskWait ();
@@ -1275,7 +1275,7 @@ public void shouldSetExpireTimeCorrectlyWhenMissingFromPayload() throws Exceptio
1275
1275
threadAndTaskWait ();
1276
1276
1277
1277
long expireTime = (Long )TestHelpers .getAllNotificationRecords (dbHelper ).get (0 ).get (NotificationTable .COLUMN_NAME_EXPIRE_TIME );
1278
- assertEquals ((SystemClock . currentThreadTimeMillis () / 1_000L ) + 259_200 , expireTime );
1278
+ assertEquals ((System . currentTimeMillis () / 1_000L ) + 259_200 , expireTime );
1279
1279
}
1280
1280
1281
1281
// TODO: Once we figure out the correct way to process notifications with high priority using the WorkManager
You can’t perform that action at this time.
0 commit comments