summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/tests/systemproperties/src/android/os/SystemPropertiesTest.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java b/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
index 243ac38eac2e..544a96727217 100644
--- a/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
+++ b/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
@@ -23,8 +23,19 @@ import android.test.suitebuilder.annotation.SmallTest;
public class SystemPropertiesTest extends TestCase {
private static final String KEY = "sys.testkey";
+ private static final String PERSIST_KEY = "persist.sys.testkey";
+
+ @SmallTest
+ public void testStressPersistPropertyConsistency() throws Exception {
+ for (int i = 0; i < 100; ++i) {
+ SystemProperties.set(PERSIST_KEY, Long.toString(i));
+ long ret = SystemProperties.getLong(PERSIST_KEY, -1);
+ assertEquals(i, ret);
+ }
+ }
+
@SmallTest
- public void testLongSequencialProperties() throws Exception {
+ public void testStressMemoryPropertyConsistency() throws Exception {
for (int i = 0; i < 100; ++i) {
SystemProperties.set(KEY, Long.toString(i));
long ret = SystemProperties.getLong(KEY, -1);