-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TestAppRunTimeout: Fix OnStop_timeout flakiness
The OnStop_timeout test was flaky because of the very small StartTimeout. We would sometimes hit a condition where: App.Run calls App.Start with a timeout of 1 millisecond. This takes just long enough that App.Start gives up. As a result, App.Run does not call App.Stop, which causes the test to fail because we don't see the Stop event. Resolve the flakiness with the use of a mock clock. Now, time doesn't advance while the start hook is running, so we can be certain that the really long OnStop hook is invoked and has a chance to time out.
- Loading branch information
Showing
1 changed file
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters