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

Make :server:check pass successfully #471

Merged
merged 3 commits into from
Mar 29, 2021
Merged

Make :server:check pass successfully #471

merged 3 commits into from
Mar 29, 2021

Conversation

adnapibar
Copy link
Contributor

@adnapibar adnapibar commented Mar 27, 2021

Description

As part of the renaming work #160, a few tests are failing for ./gradlew :server:check.

org.opensearch.plugins.PluginsServiceTests.testNonExtensibleDep
org.opensearch.plugins.PluginsServiceTests.testExistingMandatoryInstalledPlugin

The PluginsServiceTests uses a couple of dummy plugin jars which are in the test/resources directory. The jars have classes with imports org.elasticsearch.*.

This is fixed in this PR by recreating the jars after renaming those imports.

org.opensearch.OpenSearchExceptionTests.testDeduplicate
org.opensearch.rest.action.RestActionsTests.testBuildBroadcastShardsHeader
org.opensearch.action.search.SearchPhaseExecutionExceptionTests.testToXContent

As we changed the metadata prefix in OpenSearchException from es. to opensearch. (commit 13f6d23), the order of the keys in the HashMap changed. However, the tests are expecting a value which relies on a certain order . Ideally, these tests should not assume the order as there is no guarantee provided by HashMap.

This is fixed in this PR by only changing the order of expected result so the tests pass.

In #454 we renamed the example data used in tests - this caused a few tests to fail

org.opensearch.search.nested.SimpleNestedIT
org.opensearch.search.query.SearchQueryIT

In this PR, we fix those renaming issues.

Issues Resolved

Issues mentioned in #441

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

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.

Signed-off-by: Rabi Panda adnapibar@gmail.com

The PluginsServiceTests uses couple of dummy plugin jars from the resources directory. The jars have classes with imports with package name `org.elasticsearch.*`. This commit recreates the jars after renaming those package names.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
As we changed the metadata prefix in OpenSearchException from `es.` to `opensearch.` (commit 13f6d23), the order of the keys in the HashMap changed (HashMap does not guarantee a order). However, the tests are expecting a value which relies on a certain order . Ideally, these tests should not assume the order.

This commit doesn't rewrite the test but only changes the order so the tests pass.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
As part of the commit 0bdd129, we renamed the data examples in used in the test cases. This caused the test failures in SimpleNestedIT as it was sorting the results and the rename changed the order of the search result. In SearchQueryIT, we missed to rename the term used in the query.

This commit fixes both the issues.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
@adnapibar adnapibar added >FORK Related to the fork process >test-failure Test failure from CI, local build, etc. Rename Renaming to OpenSearch labels Mar 27, 2021
@adnapibar adnapibar mentioned this pull request Mar 27, 2021
77 tasks
@odfe-release-bot
Copy link

✅   DCO Check Passed 1f135e9

@odfe-release-bot
Copy link

✅   Gradle Wrapper Validation success 1f135e9

@odfe-release-bot
Copy link

✅   Gradle Precommit success 1f135e9

Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adnapibar adnapibar merged commit bc45d71 into opensearch-project:main Mar 29, 2021
@adnapibar adnapibar deleted the server-check branch March 29, 2021 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>FORK Related to the fork process Rename Renaming to OpenSearch >test-failure Test failure from CI, local build, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants