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

Add a unit test for MultiTermsAggregator.buildEmptyAggregations (#7089) #7319

Closed
wants to merge 1 commit into from

Conversation

austintlee
Copy link
Contributor

Description

A new unit test for the implementation of buildEmptyAggregation in MultiTermsAggregator

Issues Resolved

#7089

Check List

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

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

Gradle Check (Jenkins) Run Completed with:

@dblock
Copy link
Member

dblock commented Apr 28, 2023

@austintlee Thanks! What are your concerns with this UT? The amount of setup you had to do to get to the actual aggregation?

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@austintlee
Copy link
Contributor Author

@dblock yeah, the current implementation of MultiTermsAggregator makes it quite difficult to unit test it due to very heavy setup. Maybe this is generally the case for many classes in OpenSearch? Is there an issue for that that I can take a look at? Coming back to this, I think having a unit test is still worth it.

The reason why this PR is failing checks is because this commit needs to be built on top of the other commit that has the actual fix for the NPE which is in another PR. I can add this commit to #7318

@dblock
Copy link
Member

dblock commented May 1, 2023

@dblock yeah, the current implementation of MultiTermsAggregator makes it quite difficult to unit test it due to very heavy setup. Maybe this is generally the case for many classes in OpenSearch? Is there an issue for that that I can take a look at? Coming back to this, I think having a unit test is still worth it.

Absolutely. And thank you.

I don't know of an open issue for this, feel free to make one or just do it. Any code deleted will be appreciated!

The reason why this PR is failing checks is because this commit needs to be built on top of the other commit that has the actual fix for the NPE which is in another PR. I can add this commit to #7318

Yep, you should. A failing unit test that demonstrates a problem is a great step 1 for a fix, but you already did the step 2 of fixing the issue, so you're all set 😅 Close this and tack the UT to the other PR and iterate to green.

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity. Remove stalled label or comment or this will be closed in 7 days.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Jun 22, 2023
@opensearch-trigger-bot
Copy link
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@kotwanikunal
Copy link
Member

Apologies. This PR was auto closed without reaching a resolution from the maintainers.
Re-opening to move it forward.
Thanks for your contributions to OpenSearch!

@github-actions
Copy link
Contributor

Compatibility status:

Checks if related components are compatible with change b511b78

Incompatible components

Skipped components

Compatible components

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@ashking94
Copy link
Member

Closing this PR as the marked issue is closed already

@ashking94 ashking94 closed this Dec 26, 2023
@peternied
Copy link
Member

@reta looks like you closed out the issue related to this change, what do you think of this change?

@austintlee did you still want to see about getting this change merged?

@austintlee
Copy link
Contributor Author

We can close this one. As I mentioned above, I merged the change in this PR into another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog stalled Issues that have stalled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants