Class MemoryLeakUtils
- java.lang.Object
-
- org.glassfish.jersey.test.memleak.common.MemoryLeakUtils
-
public class MemoryLeakUtils extends Object
Utility class for memory leak test infrastructure.- Author:
- Stepan Vavra
-
-
Field Summary
Fields Modifier and Type Field Description static StringJERSEY_CONFIG_TEST_CONTAINER_CONTEXT_ROOTThe context root where the deployed application will be accessible.static StringJERSEY_CONFIG_TEST_CONTAINER_LOGFILEThe log file where the output (stdout/stderr) of container is located.static StringJERSEY_CONFIG_TEST_MEMLEAK_HEAP_DUMP_PATHThe path where to create heap dump files.static StringJERSEY_CONFIG_TEST_MEMLEAK_TIMEOUTThe memory leak timeout denotes successful end of the memory leak test.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidverifyNoOutOfMemoryOccurred()Scans the file denoted byJERSEY_CONFIG_TEST_CONTAINER_LOGFILEforOutOfMemoryErrorrecords.
-
-
-
Field Detail
-
JERSEY_CONFIG_TEST_CONTAINER_LOGFILE
public static final String JERSEY_CONFIG_TEST_CONTAINER_LOGFILE
The log file where the output (stdout/stderr) of container is located. For instance, this file is used for detection ofOutOfMemoryErrorexception records.- See Also:
- Constant Field Values
-
JERSEY_CONFIG_TEST_MEMLEAK_TIMEOUT
public static final String JERSEY_CONFIG_TEST_MEMLEAK_TIMEOUT
The memory leak timeout denotes successful end of the memory leak test. That is, if the memory leak didn't occur during the specified timeout, the test successfully finishes.- See Also:
- Constant Field Values
-
JERSEY_CONFIG_TEST_CONTAINER_CONTEXT_ROOT
public static final String JERSEY_CONFIG_TEST_CONTAINER_CONTEXT_ROOT
The context root where the deployed application will be accessible.- See Also:
- Constant Field Values
-
JERSEY_CONFIG_TEST_MEMLEAK_HEAP_DUMP_PATH
public static final String JERSEY_CONFIG_TEST_MEMLEAK_HEAP_DUMP_PATH
The path where to create heap dump files.- See Also:
- Constant Field Values
-
-
Method Detail
-
verifyNoOutOfMemoryOccurred
public static void verifyNoOutOfMemoryOccurred() throws IOExceptionScans the file denoted byJERSEY_CONFIG_TEST_CONTAINER_LOGFILEforOutOfMemoryErrorrecords.- Throws:
IOException- In case of I/O error.IllegalStateException- In case theOutOfMemoryErrorrecord was found.
-
-