spring-test-smart-context
spring-test-smart-context copied to clipboard
Resource leakage PoC
Track used resources between integration test execution:
- heap memory
- number of active threads
TODO add sensors:
- number of opened file descriptors
- distinguish server and client network connections
- number of active docker containers by testcontainers
- number of loaded classes(?)
Optionally after each test group that share the same config (and accordingly context) it's possible to opt-in call of System.gc() via option -Dtestsmartcontext.handleAfterClassGroup.gc=true. Usually it's a bad practice, but for the sake of better heap reports this can give better clarity, so makes sense to use from time to time.