This substitutes Thread.sleep() with calls to appropriate Awaitility methods as described in #21873

Comment From: wilkinsona

Thanks very much, @tszmytka.