Fix failure of tests due to dbManager cannot be reset if closed