Speed up test 080-oom-throw
Reduce heap size, optimize blowup. The test just checks that OOME
get thrown for a fe basic operations. This is the same on all heap
sizes, just slower for larger heaps.
Before:
real 1m13.247s
user 1m11.115s
sys 0m1.834s
After:
real 0m26.604s
user 0m25.470s
sys 0m0.696s
Bug: 36501991
Test: time test/run-test --host 080-oom-throw
Change-Id: Id9d1ba702949a1f6070f6f20fb457e1749f90f25
diff --git a/test/080-oom-throw/src/Main.java b/test/080-oom-throw/src/Main.java
index a6c18b7..3d5d062 100644
--- a/test/080-oom-throw/src/Main.java
+++ b/test/080-oom-throw/src/Main.java
@@ -114,13 +114,13 @@
static Object[] holder;
public static void blowup() throws Exception {
- int size = 32 * 1024 * 1024;
+ int size = 2 * 1024 * 1024;
for (int i = 0; i < holder.length; ) {
try {
holder[i] = new char[size];
i++;
} catch (OutOfMemoryError oome) {
- size = size / 2;
+ size = size / 16;
if (size == 0) {
break;
}