8159899: [TEST_BUG] Timeout in tests when OOM should be generated

Reviewed-by: yan, ssadetsky
This commit is contained in:
Sergey Bylokhov 2016-07-26 15:55:22 +03:00
parent 964fd1e4e9
commit c322804814
4 changed files with 5 additions and 4 deletions

View File

@ -29,7 +29,7 @@
* @author Pavel Porvatov
* @library ../../regtesthelpers
* @build Util
* @run main bug6464022
* @run main/othervm -mx128m bug6464022
*/
import javax.swing.*;

View File

@ -28,7 +28,7 @@
* @author Alexander Potochkin
* @library ../../regtesthelpers
* @build Util
* @run main bug6795356
* @run main/othervm -mx128m bug6795356
*/
import java.lang.ref.WeakReference;

View File

@ -81,7 +81,8 @@ public class Util {
/**
* Fills the heap until OutOfMemoryError occurs. This method is useful for
* WeakReferences removing.
* WeakReferences removing. To minimize the amount of filled memory the
* test should provide reasonable heap size via -mx option.
*/
public static void generateOOME() {
List<Object> bigLeak = new LinkedList<Object>();

View File

@ -31,7 +31,7 @@ import sun.java2d.DisposerRecord;
* @test
* @bug 8129457
* @summary Check Disposer disposes all objects without any memory leaks
* @run main/othervm TestDisposerLeak
* @run main/othervm -mx128m TestDisposerLeak
* @modules java.desktop/sun.java2d
*/
public final class TestDisposerLeak {