--- old/test/hotspot/jtreg/gc/g1/mixedgc/TestLogging.java 2018-09-12 19:06:33.251157777 -0400 +++ new/test/hotspot/jtreg/gc/g1/mixedgc/TestLogging.java 2018-09-12 19:06:31.847077760 -0400 @@ -166,7 +166,14 @@ System.out.println("Allocating new objects to provoke mixed GC"); // allocate more objects to provoke GC for (int i = 0; i < (TestLogging.ALLOCATION_COUNT * 20); i++) { - newObjects.add(new byte[TestLogging.ALLOCATION_SIZE]); + try { + newObjects.add(new byte[TestLogging.ALLOCATION_SIZE]); + } catch (OutOfMemoryError e) { + newObjects.clear(); + WB.youngGC(); + WB.youngGC(); + break; + } } // check that liveOldObjects still alive Asserts.assertTrue(WB.isObjectInOldGen(liveOldObjects),