METRON-1429: SearchIntegrationTest refactor #909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 very minor request and I'm +1 on this by inspection. Thanks for tackling this @merrimanr!
Assert.assertEquals(10, results.size()); | ||
|
||
// the remaining are missing the 'threat:triage:score' and should be sorted last | ||
Assert.assertFalse(results.get(0).getSource().containsKey("threat:triage:score")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put this in a simple loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Assert.assertEquals("10", results.get(1).getSource().get("threat:triage:score")); | ||
|
||
// the remaining are missing the 'threat:triage:score' and should be sorted last | ||
Assert.assertFalse(results.get(2).getSource().containsKey("threat:triage:score")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - Maybe put this in a simple loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Should this be against master or should this be committed against the Solr branch? It seems like this is general purpose goodness and maybe fits in master, but I wanted to double check. |
@cestella This is going into master per the merge notes, right? |
@mmiklavc I just wanted to make sure it was submitted against the right branch. I am totally ok with that given the content of the PR, but the question is whether there's anything solr specific here (I don't think so), but wanted to confirm. If there's Solr specific stuff, it probably should go into the feature branch. |
I think this is useful outside of any Solr work and I intended for it to go into master. |
Sounds good, +1 Good work here, that test was confusing. |
+1 pending travis |
@cestella You're right about that - the general goodness. We (I) had made the mistake of doing some test refactoring in the ES upgrade branch that would have been better done in a separate PR, committed to master, and then pulled into the ES branch. Splitting out improvements/refactorings the way Ryan did here means everyone gets the benefit, and further changes or enhancements don't get mangled in repeated merges in the Solr feature branch. |
Contributor Comments
This PR cleans up SearchIntegrationTest which will make it easier to create a Solr implementation. Changes include:
-
character. This made the tests confusing because different ids were being used for validation and is no longer needed.All tests should still run after this change.
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:
For code changes:
Have you included steps to reproduce the behavior or problem that is being changed or addressed?
Have you included steps or a guide to how the change may be verified and tested manually?
Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
Have you written or updated unit tests and or integration tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
For documentation related changes:
Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via
site-book/target/site/index.html
:Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.