There was a question on StackOverflow about how to set a timeout for URL.text
I have attached a patch which allows you to do:
(which will give you a 10 millisecond timeout on both the connection and read – and return null if this timeout fires)
No Tests Supplied
I have no idea how you would test this in a non-contrived way, I have looked around for a URL.text test and it seems that I would need to mock the URL class, but I can't think how to do the timeout testing with this object
Hope it's ok...