Improve IndexRebuild test to test connections.