test for session and connection leaks

For application on 2.0 and 2.1.