Add unit test to ensure dead connections are not selected