diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-09-12 10:06:53 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-09-12 15:18:12 -0700 |
commit | e2233ca92da0339686da18db4a1e27b9a4c76b91 (patch) | |
tree | 2b296d5bf64dde003f2b9926c848244d15dac09c /harmony-tests | |
parent | 8806710d7a5cd6a168f2463de21498c58f70948a (diff) | |
download | libcore-e2233ca92da0339686da18db4a1e27b9a4c76b91.zip libcore-e2233ca92da0339686da18db4a1e27b9a4c76b91.tar.gz libcore-e2233ca92da0339686da18db4a1e27b9a4c76b91.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
Change-Id: I62a8e0240a8a8a95dcb9a8a2423bb57dfcff3c1a
Diffstat (limited to 'harmony-tests')
-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() { } |