nickwallen opened a new pull request #1451: METRON-2168 Elasticsearch Updates 
Not Tested in Integration Test
URL: https://github.com/apache/metron/pull/1451
 
 
   The `ElasticsearchUpdateIntegrationTest` is not testing that the 
`ElasticsearchDao` can update and retrieve values in a manner similar to what 
would occur in production.
   
   ### What?
   Within the Elasticsearch index, the test fails to define the 'guid' field to 
be of type 'keyword', instead the type is defaulted to 'text'.  In a production 
setting this mistake would prevent any documents from being found by guid.  
Unfortunately, the test passes despite this. The test needs to match the 
behavior of what a user would experience in production.
   
   ### Why? 
   These problems arise because of the way the test is setup.  Instead of 
directly testing an `ElasticsearchDao` as you might expect this test runs 
against a `MultiIndexDao` initialized with both an `ElasticseachDao` and an 
`HBaseDao`. On retrievals the `MultIndexDao` will return the document from 
whichever index responds first.
   
   With the current test setup, the underlying `ElasticsearchDao` will never 
retrieve the document that the test case is expected.  In all cases where the 
test passes, the document is actually being returned from the `HBaseDao` which 
is actually just interacting with a mock backend.  The test needs to actually 
test that we can update and retrieve documents from Elasticsearch.
   
   ### Proof?
    If you alter the test to run against just an `ElasticsearchDao` the test 
will fail as follows in the attached log file.
   
   ## Testing
   
   This only changes the integration tests.  Run the integration tests to 
validate these changes.
   
   ## Pull Request Checklist
   
   - [ ] Is there a JIRA ticket associated with this PR? If not one needs to be 
created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
   - [ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
   - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   - [ ] 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](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] Have you verified the basic functionality of the build by building and 
running locally with Vagrant full-dev environment or the equivalent?
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to