Add some thread.sleep to avoid test failures