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 PowerMock related tests due to version bump #638

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

opensearch-trigger-bot[bot]
Copy link

Backport c92cdc8 from #637

2.2 added a new dependency of ClusterSettings like TaskResourceTrackingService. It is possible that the classloader that loadsTaskResourceTrackingService is different from the classloader that loads PowerMock and related dependencies. PowerMock reports java.lang.NoClassDefFoundError when initializing ClusterSettings. Since we are not actually using the value of ClusterSettings in the tests, we make it null to avoid initializing it. The change fixed failed tests.

This PR also fixed spotless errors in FakeNode due to recent changes.

Testing done:
* gradle build

Signed-off-by: Kaituo Li <kaituo@amazon.com>
(cherry picked from commit c92cdc8)
@opensearch-trigger-bot opensearch-trigger-bot bot requested a review from a team August 9, 2022 16:37
@ohltyler ohltyler merged commit cc3f48e into 2.x Aug 9, 2022
@ohltyler ohltyler deleted the backport/backport-637-to-2.x branch August 9, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants