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.JerseyTestAdds support for web application testing and memory leak detection in target JVM.- Author:
- Stepan Vavra
-
-
Constructor Summary
Constructors Constructor Description AbstractMemoryLeakWebAppTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureClient(org.glassfish.jersey.client.ClientConfig config)protected org.glassfish.jersey.test.DeploymentContextconfigureDeployment()voidverifyNoOutOfMemoryOccurred()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.-
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
-
-
-
-
Method Detail
-
verifyNoOutOfMemoryOccurred
public void verifyNoOutOfMemoryOccurred() throws IOExceptionVerifies 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
protected void configureClient(org.glassfish.jersey.client.ClientConfig config)
- Overrides:
configureClientin classorg.glassfish.jersey.test.JerseyTest
-
-