summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Chow <ktchow@google.com>2023-03-31 09:09:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-03-31 09:09:06 +0000
commitbbae438387f270f222b3f96a7bfe232eab02e01b (patch)
treee0761b0a9922f947369056e6d6787bfea37f2a29
parent64b6b1de2c37e8955a6bbfc05ac38a58f229066b (diff)
parent0f0c3bc1130179d14e9cbf55d24d852210165198 (diff)
downloadIwlan-bbae438387f270f222b3f96a7bfe232eab02e01b.tar.gz
Merge "Update retry time on default error policy"
-rw-r--r--assets/defaultiwlanerrorconfig.json8
-rw-r--r--test/com/google/android/iwlan/ErrorPolicyManagerTest.java18
2 files changed, 13 insertions, 13 deletions
diff --git a/assets/defaultiwlanerrorconfig.json b/assets/defaultiwlanerrorconfig.json
index 212f611..c533c46 100644
--- a/assets/defaultiwlanerrorconfig.json
+++ b/assets/defaultiwlanerrorconfig.json
@@ -68,19 +68,19 @@
{
"ErrorType": "*",
"ErrorDetails": ["*"],
- "RetryArray": ["5", "10", "-1"],
+ "RetryArray": ["1", "2", "2", "10", "20", "40", "80", "160", "320", "640", "1280", "1800", "3600", "-1"],
"UnthrottlingEvents": ["APM_ENABLE_EVENT", "APM_DISABLE_EVENT", "WIFI_DISABLE_EVENT", "WIFI_AP_CHANGED_EVENT"]
},
{
"ErrorType": "GENERIC_ERROR_TYPE",
"ErrorDetails": ["IO_EXCEPTION"],
- "RetryArray": ["0", "0", "0", "60+r15", "120", "-1"],
+ "RetryArray": ["0", "0", "0", "30", "60+r15", "120", "-1"],
"UnthrottlingEvents": ["APM_ENABLE_EVENT", "APM_DISABLE_EVENT", "WIFI_DISABLE_EVENT", "WIFI_AP_CHANGED_EVENT"]
},
{
"ErrorType": "IKE_PROTOCOL_ERROR_TYPE",
- "ErrorDetails": ["24", "9002"],
- "RetryArray": ["10", "20", "40", "80", "160"],
+ "ErrorDetails": ["*"],
+ "RetryArray": ["5", "10", "10", "20", "40", "80", "160", "320", "640", "1280", "1800", "3600", "-1"],
"UnthrottlingEvents": ["APM_ENABLE_EVENT", "WIFI_DISABLE_EVENT", "WIFI_CALLING_DISABLE_EVENT"]
}
]
diff --git a/test/com/google/android/iwlan/ErrorPolicyManagerTest.java b/test/com/google/android/iwlan/ErrorPolicyManagerTest.java
index 0895f09..0d68f6e 100644
--- a/test/com/google/android/iwlan/ErrorPolicyManagerTest.java
+++ b/test/com/google/android/iwlan/ErrorPolicyManagerTest.java
@@ -275,7 +275,7 @@ public class ErrorPolicyManagerTest {
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(10, time);
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
- assertEquals(10, time);
+ assertEquals(20, time);
}
@Test
@@ -311,6 +311,10 @@ public class ErrorPolicyManagerTest {
// parsing (or lack of explicit carrier-defined policy).
IwlanError iwlanError = buildIwlanIkeAuthFailedError();
long time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
+ assertEquals(5, time);
+ time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
+ assertEquals(10, time);
+ time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(10, time);
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(20, time);
@@ -318,13 +322,13 @@ public class ErrorPolicyManagerTest {
assertEquals(40, time);
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(80, time);
- time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
- assertEquals(160, time);
- time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
- assertEquals(86400, time);
iwlanError = buildIwlanIkeProtocolError(9002);
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
+ assertEquals(5, time);
+ time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
+ assertEquals(10, time);
+ time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(10, time);
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(20, time);
@@ -332,10 +336,6 @@ public class ErrorPolicyManagerTest {
assertEquals(40, time);
time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
assertEquals(80, time);
- time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
- assertEquals(160, time);
- time = mErrorPolicyManager.reportIwlanError(apn, iwlanError);
- assertEquals(86400, time);
}
@Test