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

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport e2a664c from #8901.

#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 <[email protected]>

* Add a deterministic test case for timeout

Signed-off-by: Andrew Ross <[email protected]>

---------

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit e2a664c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross
Copy link
Member

Gradle Check (Jenkins) Run Completed with:

* **RESULT:**  ❌

* **URL:** https://build.ci.opensearch.org/job/gradle-check/21171/

* **CommitID:** [ece1c53](https://github.com/opensearch-project/OpenSearch/commit/ece1c5309a406adbfd78dfc93c3c2e13a2715d25)
  Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
  Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

This build succeeded, but it appears the Jenkins API returned an error to the poller causing it to report a failure.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@Poojita-Raj
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

* **RESULT:** FAILURE ❌

* **URL:** https://build.ci.opensearch.org/job/gradle-check/21184/

* **CommitID:** [ece1c53](https://github.com/opensearch-project/OpenSearch/commit/ece1c5309a406adbfd78dfc93c3c2e13a2715d25)
  Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
  Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

Flaky #5031

@Poojita-Raj
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

* **RESULT:**  ❌

* **URL:** https://build.ci.opensearch.org/job/gradle-check/21171/

* **CommitID:** [ece1c53](https://github.com/opensearch-project/OpenSearch/commit/ece1c5309a406adbfd78dfc93c3c2e13a2715d25)
  Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
  Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

This build succeeded, but it appears the Jenkins API returned an error to the poller causing it to report a failure.

Approving since we have 1 successful gradle check here

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #8934 (ece1c53) into 2.x (212dba4) will increase coverage by 0.04%.
Report is 8 commits behind head on 2.x.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                2.x    #8934      +/-   ##
============================================
+ Coverage     70.74%   70.79%   +0.04%     
- Complexity    57284    57349      +65     
============================================
  Files          4745     4745              
  Lines        271064   271064              
  Branches      39981    39981              
============================================
+ Hits         191768   191893     +125     
+ Misses        62873    62705     -168     
- Partials      16423    16466      +43     

see 461 files with indirect coverage changes

@kotwanikunal kotwanikunal merged commit 96da1f2 into 2.x Jul 28, 2023
10 of 34 checks passed
@github-actions github-actions bot deleted the backport/backport-8901-to-2.x branch July 28, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants