diff options
| author | Matthew Williams <mjwilliams@google.com> | 2013-08-13 15:53:31 -0700 |
|---|---|---|
| committer | Matthew Williams <mjwilliams@google.com> | 2013-08-16 12:01:22 -0700 |
| commit | ba35271e91648c9cde2bb606aaf2001282231b07 (patch) | |
| tree | 833f8ec64cd9f1c853414580f3fadd7a41a9c3d1 /services/tests | |
| parent | 2241d45c68739e5bdf187ba3325ee237ef143e21 (diff) | |
| download | frameworks_base-ba35271e91648c9cde2bb606aaf2001282231b07.zip frameworks_base-ba35271e91648c9cde2bb606aaf2001282231b07.tar.gz frameworks_base-ba35271e91648c9cde2bb606aaf2001282231b07.tar.bz2 | |
Use pending.xml to persist sync ops.
Support pending ops by producing badly formed xml.
fixed bug that stopped alarm manager from updating if the
next alarm time is in the past.
Use new AlarmManager API for old AM behaviour - to set
exact alarms.
Change-Id: I57090f9c7155996298be7ec968a88f17ac1938a7
Diffstat (limited to 'services/tests')
| -rw-r--r-- | services/tests/servicestests/src/com/android/server/content/SyncStorageEngineTest.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/services/tests/servicestests/src/com/android/server/content/SyncStorageEngineTest.java b/services/tests/servicestests/src/com/android/server/content/SyncStorageEngineTest.java index dff6661..e44652f 100644 --- a/services/tests/servicestests/src/com/android/server/content/SyncStorageEngineTest.java +++ b/services/tests/servicestests/src/com/android/server/content/SyncStorageEngineTest.java @@ -67,7 +67,7 @@ public class SyncStorageEngineTest extends AndroidTestCase { /** * Test that we handle the case of a history row being old enough to purge before the - * correcponding sync is finished. This can happen if the clock changes while we are syncing. + * corresponding sync is finished. This can happen if the clock changes while we are syncing. * */ // TODO: this test causes AidlTest to fail. Omit for now @@ -104,6 +104,17 @@ public class SyncStorageEngineTest extends AndroidTestCase { engine.clearAndReadState(); assert(engine.getPendingOperationCount() == 1); + List<SyncStorageEngine.PendingOperation> pops = engine.getPendingOperations(); + SyncStorageEngine.PendingOperation popRetrieved = pops.get(0); + assertEquals(pop.account, popRetrieved.account); + assertEquals(pop.reason, popRetrieved.reason); + assertEquals(pop.userId, popRetrieved.userId); + assertEquals(pop.syncSource, popRetrieved.syncSource); + assertEquals(pop.authority, popRetrieved.authority); + assertEquals(pop.expedited, popRetrieved.expedited); + assertEquals(pop.serviceName, popRetrieved.serviceName); + assert(android.content.PeriodicSync.syncExtrasEquals(pop.extras, popRetrieved.extras)); + } /** |
