diff options
author | Fredrik Hellén-Halme <fredrik.hellen-halme@sonyericsson.com> | 2011-11-24 10:30:48 +0100 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-11-19 09:38:21 +0100 |
commit | 207e297d6911151d3e556be23ede3649beccb674 (patch) | |
tree | 97602eef0796d4e0aa7a5d04698b9511c3666574 /tests/src | |
parent | 85066de0348723cff6687966c6a9c6f55e5b8b71 (diff) | |
download | calendar-jb-mr1.1-dev-plus-aosp.tar.gz |
Fix issue with invisible recurring appointmentstools_r22jb-mr1.1-dev-plus-aospjb-mr1-dev-plus-aosp
Fixes that recurring appointments goes invisible
when hit by the failsafe limit.
There is still a hard limit in RecurrenceProcessor,
but at least this limit is applied on a per-event
basis, meaning that it's always possible to create
new recurring appointments without them going invisible.
Change-Id: I6c9e1e10db78e1b73ea9f2b7104621fbbd906452
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/calendarcommon2/RRuleTest.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/src/com/android/calendarcommon2/RRuleTest.java b/tests/src/com/android/calendarcommon2/RRuleTest.java index 53988e2..1d72366 100644 --- a/tests/src/com/android/calendarcommon2/RRuleTest.java +++ b/tests/src/com/android/calendarcommon2/RRuleTest.java @@ -143,11 +143,17 @@ public class RRuleTest extends TestCase { // Infinite loop, bug 1662110 @MediumTest public void testFrequencyLimits() throws Exception { - try { - runRecurrenceIteratorTest("RRULE:FREQ=SECONDLY;BYSECOND=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14," + "15,16,17,18,19,20,21,22,23,24,25,26,27,28,29," + "30,31,32,33,34,35,36,37,38,39,40,41,42,43,44," + "45,46,47,48,49,50,51,52,53,54,55,56,57,58,59", "20000101", 1, ""); + // Rather than checking that we get an exception, + // we now want to finish, but in a reasonable time + final long tenSeconds = 10000; + long start = System.currentTimeMillis(); + runRecurrenceIteratorTest( + "RRULE:FREQ=SECONDLY;BYSECOND=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14," + + "15,16,17,18,19,20,21,22,23,24,25,26,27,28,29," + + "30,31,32,33,34,35,36,37,38,39,40,41,42,43,44," + + "45,46,47,48,49,50,51,52,53,54,55,56,57,58,59", "20000101", 1, "20000101"); + if (System.currentTimeMillis() - start > tenSeconds) { fail("Don't do that"); - } catch (DateException ex) { - // pass } } |