diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-13 15:14:12 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-13 15:14:12 -0700 |
commit | 763101efcdcf306142af891f98eaaa971e6edaf0 (patch) | |
tree | 05432be36b789bd69bb6908cfcf6bd5238ba7602 /tests/CoreTests/com | |
parent | 9e0426087b35ddbe965b71f929ef4109a2299b2c (diff) | |
parent | a03ab1a6a07614f3d588232e12d9c45d840bae82 (diff) | |
download | frameworks_base-763101efcdcf306142af891f98eaaa971e6edaf0.zip frameworks_base-763101efcdcf306142af891f98eaaa971e6edaf0.tar.gz frameworks_base-763101efcdcf306142af891f98eaaa971e6edaf0.tar.bz2 |
Merge change 21171
* changes:
Allow max_retires to be set to infinite.
Diffstat (limited to 'tests/CoreTests/com')
-rw-r--r-- | tests/CoreTests/com/android/internal/telephony/TelephonyUtilsTest.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/CoreTests/com/android/internal/telephony/TelephonyUtilsTest.java b/tests/CoreTests/com/android/internal/telephony/TelephonyUtilsTest.java index e4cf1e8..bf0c88b 100644 --- a/tests/CoreTests/com/android/internal/telephony/TelephonyUtilsTest.java +++ b/tests/CoreTests/com/android/internal/telephony/TelephonyUtilsTest.java @@ -123,6 +123,29 @@ public class TelephonyUtilsTest extends TestCase { } /** + * Test infinite retires + */ + @SmallTest + public void testRetryManageInfinite() throws Exception { + RetryManager rm = new RetryManager(); + + assertTrue(rm.configure("1000,2000,3000,max_retries=infinite")); + assertTrue(rm.isRetryNeeded()); + assertEquals(1000, rm.getRetryTimer()); + rm.increaseRetryCount(); + assertTrue(rm.isRetryNeeded()); + assertEquals(2000, rm.getRetryTimer()); + rm.increaseRetryCount(); + assertTrue(rm.isRetryNeeded()); + // All others are 3000 and isRetryNeeded is always true + for (int i=0; i < 100; i++) { + assertEquals(3000, rm.getRetryTimer()); + rm.increaseRetryCount(); + assertTrue(rm.isRetryNeeded()); + } + } + + /** * Test string configuration using all options. */ @SmallTest |