diff options
author | Fred Quintana <fredq@google.com> | 2010-01-27 12:17:49 -0800 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2010-02-05 15:16:20 -0800 |
commit | c5d1c6db61f208b206b260f897bb5bbc64be4d97 (patch) | |
tree | 91a5ffe88326b446f57b7249ddf1406b8654d2f6 /tests/CoreTests | |
parent | 0a45a09814dea0398647f26497ecff54a77c5f8c (diff) | |
download | frameworks_base-c5d1c6db61f208b206b260f897bb5bbc64be4d97.zip frameworks_base-c5d1c6db61f208b206b260f897bb5bbc64be4d97.tar.gz frameworks_base-c5d1c6db61f208b206b260f897bb5bbc64be4d97.tar.bz2 |
add sync polling
- added the ability to specify that a sync (of account/authority/extras)
should occur at a given frequency
- the existing daily poll code was replaced with seeding each
account/authority with a 24 hour periodic sync
- enhanced the "adb shell dumpsys content" output to show the
periodic syncs and when they will next run
Diffstat (limited to 'tests/CoreTests')
-rw-r--r-- | tests/CoreTests/android/content/SyncQueueTest.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/CoreTests/android/content/SyncQueueTest.java b/tests/CoreTests/android/content/SyncQueueTest.java index 5f4ab78..1da59d1 100644 --- a/tests/CoreTests/android/content/SyncQueueTest.java +++ b/tests/CoreTests/android/content/SyncQueueTest.java @@ -66,22 +66,22 @@ public class SyncQueueTest extends AndroidTestCase { long now = SystemClock.elapsedRealtime() + 200; - assertEquals(op6, mSyncQueue.nextReadyToRun(now)); + assertEquals(op6, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op6); - assertEquals(op1, mSyncQueue.nextReadyToRun(now)); + assertEquals(op1, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op1); - assertEquals(op4, mSyncQueue.nextReadyToRun(now)); + assertEquals(op4, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op4); - assertEquals(op5, mSyncQueue.nextReadyToRun(now)); + assertEquals(op5, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op5); - assertEquals(op2, mSyncQueue.nextReadyToRun(now)); + assertEquals(op2, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op2); - assertEquals(op3, mSyncQueue.nextReadyToRun(now)); + assertEquals(op3, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op3); } @@ -109,32 +109,32 @@ public class SyncQueueTest extends AndroidTestCase { long now = SystemClock.elapsedRealtime() + 200; - assertEquals(op6, mSyncQueue.nextReadyToRun(now)); + assertEquals(op6, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op6); - assertEquals(op1, mSyncQueue.nextReadyToRun(now)); + assertEquals(op1, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op1); mSettings.setBackoff(ACCOUNT2, AUTHORITY3, now + 200, 5); - assertEquals(op5, mSyncQueue.nextReadyToRun(now)); + assertEquals(op5, mSyncQueue.nextReadyToRun(now).first); mSettings.setBackoff(ACCOUNT2, AUTHORITY3, SyncStorageEngine.NOT_IN_BACKOFF_MODE, 0); - assertEquals(op4, mSyncQueue.nextReadyToRun(now)); + assertEquals(op4, mSyncQueue.nextReadyToRun(now).first); mSettings.setDelayUntilTime(ACCOUNT2, AUTHORITY3, now + 200); - assertEquals(op5, mSyncQueue.nextReadyToRun(now)); + assertEquals(op5, mSyncQueue.nextReadyToRun(now).first); mSettings.setDelayUntilTime(ACCOUNT2, AUTHORITY3, 0); - assertEquals(op4, mSyncQueue.nextReadyToRun(now)); + assertEquals(op4, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op4); - assertEquals(op5, mSyncQueue.nextReadyToRun(now)); + assertEquals(op5, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op5); - assertEquals(op2, mSyncQueue.nextReadyToRun(now)); + assertEquals(op2, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op2); - assertEquals(op3, mSyncQueue.nextReadyToRun(now)); + assertEquals(op3, mSyncQueue.nextReadyToRun(now).first); mSyncQueue.remove(op3); } |