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

[Backport 2.x] Fix flakiness in MasterServiceTests.testThrottlingForMultipleTaskTypes #8934

Merged
merged 1 commit into from
Jul 28, 2023

Commits on Jul 27, 2023

  1. Fix flakiness in MasterServiceTests.testThrottlingForMultipleTaskTypes (

    #8901)
    
    * Fix flakiness in MasterServiceTests.testThrottlingForMultipleTaskTypes
    
    The test configured a [timeout duration of zero][1] for certain tasks
    and asserted that all tasks were throttled or timed out. This is not a
    valid assertion because it is possible for a task to complete before the
    [asynchronous timeout operation runs][2], which means the task would
    complete successfully. The fix is to adjust the assertion to allow for
    successful tasks in this case.
    
    [1]: https://github.com/opensearch-project/OpenSearch/blob/60985bc300d9eafd36c1ab25d46235e1c925c565/server/src/test/java/org/opensearch/cluster/service/MasterServiceTests.java#L941
    [2]: https://github.com/opensearch-project/OpenSearch/blob/9fc3f4096958159ec9b53012fc7ced19fd793e1b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedOpenSearchThreadPoolExecutor.java#L266
    
    Signed-off-by: Andrew Ross <andrross@amazon.com>
    
    * Add a deterministic test case for timeout
    
    Signed-off-by: Andrew Ross <andrross@amazon.com>
    
    ---------
    
    Signed-off-by: Andrew Ross <andrross@amazon.com>
    (cherry picked from commit e2a664c)
    Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    ece1c53 View commit details
    Browse the repository at this point in the history