jenkinsci / lib-file-leak-detector

Java agent that detects file handle leak
http://file-leak-detector.kohsuke.org/
MIT License
241 stars 112 forks source link

New option "excludes" to provide a file with stacktraces that should be ignored #14

Closed centic9 closed 10 years ago

centic9 commented 10 years ago

This rebases changes from pull #10 onto the latest master as there are a number of conflicts otherwise.

When using file-leak-detector in ci, there are often many cases where the file-open is ok, e.g. third-party-code which cannot be changed or code where certain files are open for a long time, e.g. database-connections or log-files.

This patch adds an option "excludes=FILE", which can be used to specify a list of stack-trace-lines which denote file-opens which can be ignored and thus do not appear in the dumps.

If these excludes are done properly, I can then add a check in CI after the tests which ensures that the dump does not contain any entry at all, causing testing to fail as soon as new unclosed file-opens are added.

buildhive commented 10 years ago

Kohsuke Kawaguchi » file-leak-detector #23 SUCCESS This pull request looks good (what's this?)