There is no guarantee that the assertion would happen AFTER "sleep" is
called.
Block the caller for an amount of time to give "update_ip_thread" time to call "sleep" and raise LoopInterruptionForTest exception to terminate the thread.
* Fix unreachable code
_get_aws_ip_ranges handles missing file exceptions and returns None,
so the excepttion handling block in the UpdateIPRange thread is never reached.
* Test for missing range file in resolver thread
A separate thread will cache the results of parsing the range
file, and the IPResolver will hit the cache instead of blocking while recomputing the
ranges everytime. The thread updates every 600s, and retry every 60s on
failures.