Disconnected from the database explicitly with a test listener

- Added garbage collection