This test is testing the state of the socket, but it would be better to test the desired outcome—is the request timing out at the appropriate time?

The state of the socket shouldn't matter as long as we're resetting it every time before using it.