Class MemoryLeakUtils
java.lang.Object
org.glassfish.jersey.test.memleak.common.MemoryLeakUtils
Utility class for memory leak test infrastructure.
- Author:
- Stepan Vavra
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe context root where the deployed application will be accessible.static final StringThe log file where the output (stdout/stderr) of container is located.static final StringThe path where to create heap dump files.static final StringThe memory leak timeout denotes successful end of the memory leak test. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidScans the file denoted byJERSEY_CONFIG_TEST_CONTAINER_LOGFILEforOutOfMemoryErrorrecords.
-
Field Details
-
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:
-
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:
-
JERSEY_CONFIG_TEST_CONTAINER_CONTEXT_ROOT
The context root where the deployed application will be accessible.- See Also:
-
JERSEY_CONFIG_TEST_MEMLEAK_HEAP_DUMP_PATH
The path where to create heap dump files.- See Also:
-
-
Method Details
-
verifyNoOutOfMemoryOccurred
Scans the file denoted byJERSEY_CONFIG_TEST_CONTAINER_LOGFILEforOutOfMemoryErrorrecords.- Throws:
IOException- In case of I/O error.IllegalStateException- In case theOutOfMemoryErrorrecord was found.
-