Give test more time to complete but do not increase sleep time more than necessary, by introducing waiting loop for test purposes.