Move the socket check to only be for integration tests