summaryrefslogtreecommitdiffstats
path: root/services/tests/servicestests
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2014-03-24 14:42:06 -0700
committerMatthew Williams <mjwilliams@google.com>2014-03-24 14:42:06 -0700
commitbb87ac7f9733ca9b490cb34e8a675dba083a57b7 (patch)
tree1dafdaf3def68c809f7831fecbe86c8330dc2ceb /services/tests/servicestests
parentc41853cee89b391cd2d4d93205ea69c746ccfa4c (diff)
downloadframeworks_base-bb87ac7f9733ca9b490cb34e8a675dba083a57b7.zip
frameworks_base-bb87ac7f9733ca9b490cb34e8a675dba083a57b7.tar.gz
frameworks_base-bb87ac7f9733ca9b490cb34e8a675dba083a57b7.tar.bz2
DO NOT MERGE: Downgrade expedited to normal on reschedule.
bug: 12033540 Expedited was previously tracked by a redundant internal variable, ostensibly as an optimisation. This variable could differ from the value in the bundle depending on how the operation is initialised, which led to confusion. Now an expedited sync will only be treated as such on its first execution. Change-Id: Ibfc4e9e49b86c82f2364a6ef55f887705a053eb6
Diffstat (limited to 'services/tests/servicestests')
-rw-r--r--services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java b/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
index 37176d6..910b685 100644
--- a/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
+++ b/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
@@ -136,10 +136,11 @@ public class SyncOperationTest extends AndroidTestCase {
"authority1", b1, soon + 100, soonFlex + 100, unimportant, unimportant, true);
assertTrue(op1.compareTo(op2) == -1);
- assertTrue("less than not transitive.", op2.compareTo(op1) == 1);
- assertTrue(op1.compareTo(op3) == 1);
- assertTrue("greater than not transitive. ", op3.compareTo(op1) == -1);
- assertTrue("overlapping intervals not the same.", op1.compareTo(op4) == 0);
- assertTrue("equality not transitive.", op4.compareTo(op1) == 0);
+ assertTrue("Less than not transitive.", op2.compareTo(op1) == 1);
+ assertEquals("Expedited not smaller than non-expedited.", -1, op1.compareTo(op3));
+ assertEquals("Greater than not transitive for expedited. ", 1, op3.compareTo(op1));
+ assertTrue("overlapping intervals not compared based on start interval.",
+ op1.compareTo(op4) == -1);
+ assertTrue("overlapping interval comparison not transitive.", op4.compareTo(op1) == 1);
}
}