Class AbstractMemoryLeakWebAppTest
java.lang.Object
org.glassfish.jersey.test.JerseyTest
org.glassfish.jersey.test.memleak.common.AbstractMemoryLeakWebAppTest
public class AbstractMemoryLeakWebAppTest
extends org.glassfish.jersey.test.JerseyTest
Adds support for web application testing and memory leak detection in target JVM.
- Author:
- Stepan Vavra
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureClient(ClientConfig config) protected org.glassfish.jersey.test.DeploymentContextvoidVerifies no OutOfMemoryError is present in associated log file.
The motivation is to have the OutOfMemory error included in the JUnit test result if possible.
The problem is that even of OutOfMemoryError occurred, it may not be logged yet.Methods inherited from class org.glassfish.jersey.test.JerseyTest
client, close, closeIfNotNull, configure, disable, enable, forceDisable, forceEnable, forceSet, getAsyncTimeoutMultiplier, getBaseUri, getClient, getLastLoggedRecord, getLoggedRecords, getPort, getSslContext, getSslParameters, getTestContainerFactory, isEnabled, set, set, setClient, setUp, target, target, tearDown
-
Constructor Details
-
AbstractMemoryLeakWebAppTest
public AbstractMemoryLeakWebAppTest()
-
-
Method Details
-
verifyNoOutOfMemoryOccurred
Verifies no OutOfMemoryError is present in associated log file.
The motivation is to have the OutOfMemory error included in the JUnit test result if possible.
The problem is that even of OutOfMemoryError occurred, it may not be logged yet. Therefore the log file needs to be inspected when the JVM is shut down and all its resources are flushed and closed.- Throws:
IOException
-
configureDeployment
protected org.glassfish.jersey.test.DeploymentContext configureDeployment()- Overrides:
configureDeploymentin classorg.glassfish.jersey.test.JerseyTest
-
configureClient
- Overrides:
configureClientin classorg.glassfish.jersey.test.JerseyTest
-