refactoring delay tests