make sure to close and free all repos in index tests