merge XD-723: Use smarter Thread.sleep() in tests

Introduce HttpSource and use it in MetricsTests

Don't swallow InterruptedException

Rewrite test using HttpSource and FileSink helper classes