-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
servstate: remove on-check-failure test races
This patch improves the following tests, all related to checker functionality in servstate observed when running under stress: TestOnCheckFailureRestartWhileRunning TestOnCheckFailureRestartDuringBackoff TestOnCheckFailureIgnore TestOnCheckFailureShutdown Since we are unit testing servstate, and not checkstate, this patch adds code to more effectively control (mock) when the check failure actions are delivered during the test. This removes the requirement for tests to rely on finely tuned delays to check various service life-cycle states. The following changes are made: - Round some of the delays to multiples of 100ms to highlight the fact these values are less important now. Delays intended to present infinite are replaced with 10s to ensure severe failures are observed if the test does not work as intended. - Remove iteration code to wait for a checker action, and replace with channel sync code. - Add some additional function comments to explain what the tests aim to confirm.
- Loading branch information
Showing
1 changed file
with
105 additions
and
56 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