You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/03/23 08:41:26 UTC
[GitHub] [solr] paulkiernan opened a new pull request #755: SOLR-16109: Updates SolrTestCaseJ4 ABC doc comparators to static
paulkiernan opened a new pull request #755:
URL: https://github.com/apache/solr/pull/755
https://issues.apache.org/jira/browse/SOLR-16109
<!--
_(If you are a project committer then you may remove some/all of the following template.)_
Before creating a pull request, please file an issue in the ASF Jira system for Solr:
* https://issues.apache.org/jira/projects/SOLR
You will need to create an account in Jira in order to create an issue.
The title of the PR should reference the Jira issue number in the form:
* SOLR-####: <short description of problem or changes>
SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
# Description
I'd like to be able to simply compare two SolrInputDocuments in unit tests without absorbing all the overhead that comes with the JUnit test suite.
# Solution
Converting the prototype of the following methods to include the static modifier transforms them into functions I can use to this end:
* compareSolrDocument
* compareSolrDocumentList
* compareSolrInputDocument
* assertSolrInputFieldEquals
# Tests
Applying this patch to a local solr repo, building the jar locally (after running `gradlew check`), and including that jar in the library dependencies of my project verify that the static comparators work as expected.
# Checklist
Please review the following and check all that apply:
- [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
- [x] I have created a Jira issue and added the issue ID to my pull request title.
- [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
- [x] I have developed this patch against the `main` branch.
- [x] I have run `./gradlew check`.
- [ ] I have added tests for my changes.
- [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] cpoerschke commented on pull request #755: SOLR-16109: Updates SolrTestCaseJ4 ABC doc comparators to static
Posted by GitBox <gi...@apache.org>.
cpoerschke commented on pull request #755:
URL: https://github.com/apache/solr/pull/755#issuecomment-1076643318
Wondering if the comparators becoming static _and_ moving into a separate class might also be something to consider, to make them (perhaps) more discoverable for use in tests?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] paulkiernan commented on pull request #755: SOLR-16109: Updates SolrTestCaseJ4 ABC doc comparators to static
Posted by GitBox <gi...@apache.org>.
paulkiernan commented on pull request #755:
URL: https://github.com/apache/solr/pull/755#issuecomment-1076632035
Sure thing, I'll take a look over the JavaDocs and add some information there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #755: SOLR-16109: Updates SolrTestCaseJ4 ABC doc comparators to static
Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #755:
URL: https://github.com/apache/solr/pull/755#issuecomment-1076284701
I'm not the Java-head to have a strong opinon on this yay or nay, however if we want to make these methods more usable by folks who maybe aren't already Solr coders, could we get some JavaDocs added?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org