You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Michael Miklavcic (JIRA)" <ji...@apache.org> on 2019/06/28 17:10:00 UTC
[jira] [Commented] (METRON-2168) Elasticsearch Updates Not Tested
in Integration Test
[ https://issues.apache.org/jira/browse/METRON-2168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16875070#comment-16875070 ]
Michael Miklavcic commented on METRON-2168:
-------------------------------------------
Good catch and explanation, [~nickwallen]. Thanks!
> Elasticsearch Updates Not Tested in Integration Test
> ----------------------------------------------------
>
> Key: METRON-2168
> URL: https://issues.apache.org/jira/browse/METRON-2168
> Project: Metron
> Issue Type: Bug
> Reporter: Nick Allen
> Assignee: Nick Allen
> Priority: Major
> Attachments: test-failure.log
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The `ElasticsearchUpdateIntegrationTest` is not testing that the `ElasticsearchDao` can update and retrieve values in a manner similar to what would occur in production.
> h3. 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.
> h3. 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.
> h3. Proof?
> If you alter the test to run against just an `ElasticsearchDao` the test will fail as follows in the attached log file.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)