How can I make a test showing a failed message if a time limit has passed?