diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-09-12 10:06:53 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-09-14 14:55:13 -0700 |
commit | e5f353301f2882776155fd1673c61a289d5eeaa1 (patch) | |
tree | a21cf80f478593e81172c22bc1c8a8b60ff4a8a2 /harmony-tests/src/test/java | |
parent | 19003bdad4a8e94d6c9b197282990c438b63ef80 (diff) | |
download | libcore-e5f353301f2882776155fd1673c61a289d5eeaa1.zip libcore-e5f353301f2882776155fd1673c61a289d5eeaa1.tar.gz libcore-e5f353301f2882776155fd1673c61a289d5eeaa1.tar.bz2 |
Delete RuntimeTest freeMemory test
Test was flaky due to bad assumptions, Runtime.freeMemory is already
tested by test_memory, test_gc.
Bug: 17448025
(cherry picked from commit e2233ca92da0339686da18db4a1e27b9a4c76b91)
Change-Id: I88d09ee5cd1c4e34c97814afd2cbadc870222738
Diffstat (limited to 'harmony-tests/src/test/java')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java index 17f822d..a41efb3 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java @@ -145,21 +145,6 @@ public class RuntimeTest extends junit.framework.TestCase { assertTrue("maxMemory() < totalMemory()", r.maxMemory() >= r.totalMemory()); } - public void test_freeMemory() { - // Heap might grow or do GC at any time, so we can't really test a lot. Hence we are just - // doing some basic sanity checks here. - long freeBefore = r.freeMemory(); - List<byte[]> arrays = new ArrayList<byte[]>(); - for (int i = 1; i < 10; i++) { - arrays.add(new byte[10000]); - } - long freeAfter = r.freeMemory(); - - // If totalMemory() has grown/shrunk freeMemory() might have gone down or up, but the - // freeMemory is unlikely to stay the same. - assertTrue("free memory must change with allocations", freeAfter != freeBefore); - } - public RuntimeTest() { } |