spring-test-smart-context icon indicating copy to clipboard operation
spring-test-smart-context copied to clipboard

Resource leakage PoC

Open seregamorph opened this issue 9 months ago • 0 comments

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.

seregamorph avatar Mar 30 '25 19:03 seregamorph