Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

servstate: remove on-check-failure test races #272

Merged
merged 2 commits into from
Aug 2, 2023

Commits on Aug 2, 2023

  1. 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.
    flotter committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    4cd9ab4 View commit details
    Browse the repository at this point in the history
  2. Fix review nits

    benhoyt committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    6a43869 View commit details
    Browse the repository at this point in the history