3 Replies Latest reply on Mar 27, 2006 5:47 AM by Tim Fox

    Automatic mem leak testing as part of continuous testing.

    Tim Fox Master

      I'm currently checking for memory leaks in our code (it looks good).

      Right now, I have produced a set of test cases corresponding to common use cases, e.g. send 1000 messages non transacted, non persistent, receive them, send 1000 messages transacted, persistent, etc. etc.

      Then I run them with the profiler, looking at what remains in memory at the end and comparing that to what I expect should be in memory at the end.

      It would be nice to automate this and have it run as part of the test suite on cc.

      If we could somehow track object allocations and garbage collection dynamically (perhaps using AOP? - can it track garbage collection of objects too without us providing a finalizer??, or perhaps using JVMPPI? - maybe Clebert has something), then we specify how many instances of each class we expect to exist at the beginning and end of each "use case" and fail() if it differs.

      I think this would be nice since mem leaks are a cause of error that's not usually trapped in standard automated testing.