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

Fix ScalingThreadPoolTest to handle new pool #10427

Merged

Conversation

andrross
Copy link
Member

@andrross andrross commented Oct 5, 2023

This was a bad use of randomization. The test is super fast so it can be run against every scaling thread pool every time.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Compatibility status:

Checks if related components are compatible with change f5983d4

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git]

@dblock
Copy link
Member

dblock commented Oct 6, 2023

Looks like a spotless problem.

* What went wrong:
Execution failed for task ':server:spotlessJavaCheck'.
> The following files had format violations:
      src/test/java/org/opensearch/threadpool/ScalingThreadPoolTests.java
          @@ -32,6 +32,8 @@
           
           package·org.opensearch.threadpool;
           
          +import·com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
          +
           import·org.opensearch.common.settings.ClusterSettings;
           import·org.opensearch.common.settings.Settings;
           import·org.opensearch.common.util.concurrent.OpenSearchThreadPoolExecutor;
          @@ -46,8 +48,6 @@
           import·java.util.function.Function;
           import·java.util.stream.Collectors;
           
          -import·com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
          -
           import·static·org.hamcrest.CoreMatchers.instanceOf;
           import·static·org.hamcrest.Matchers.equalTo;
           
  Run './gradlew :server:spotlessApply' to fix these violations.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Gradle Check (Jenkins) Run Completed with:

@andrross andrross force-pushed the fix-scaling-thread-pool-test branch from 88b3bd7 to 192c8fc Compare October 6, 2023 16:05
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Gradle Check (Jenkins) Run Completed with:

This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.

Signed-off-by: Andrew Ross <[email protected]>
@andrross andrross force-pushed the fix-scaling-thread-pool-test branch from 192c8fc to f5983d4 Compare October 10, 2023 03:57
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=pit/10_basic/Delete all}

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #10427 (f5983d4) into main (22ddcf1) will decrease coverage by 0.11%.
Report is 2 commits behind head on main.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main   #10427      +/-   ##
============================================
- Coverage     71.28%   71.18%   -0.11%     
+ Complexity    58480    58413      -67     
============================================
  Files          4843     4843              
  Lines        275265   275267       +2     
  Branches      40076    40076              
============================================
- Hits         196227   195940     -287     
- Misses        62621    62962     +341     
+ Partials      16417    16365      -52     
Files Coverage Δ
...c/main/java/org/opensearch/index/IndexService.java 75.65% <ø> (-0.44%) ⬇️
...in/java/org/opensearch/index/shard/IndexShard.java 69.47% <0.00%> (-0.34%) ⬇️

... and 502 files with indirect coverage changes

@andrross andrross merged commit 506065c into opensearch-project:main Oct 10, 2023
@andrross andrross deleted the fix-scaling-thread-pool-test branch October 10, 2023 13:54
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 10, 2023
This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 506065c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 10, 2023
This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 506065c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dblock pushed a commit that referenced this pull request Oct 10, 2023
This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.


(cherry picked from commit 506065c)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deshsidd pushed a commit to deshsidd/OpenSearch that referenced this pull request Oct 19, 2023
This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Oct 23, 2023
This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.

Signed-off-by: Andrew Ross <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
This was a bad use of randomization. The test is super fast so it can be
run against every scaling thread pool every time.

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
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.

4 participants