[ 
https://issues.apache.org/jira/browse/METRON-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16700746#comment-16700746
 ] 

ASF GitHub Bot commented on METRON-1845:
----------------------------------------

Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1247#discussion_r236765044
  
    --- Diff: 
metron-platform/metron-solr/src/test/java/org/apache/metron/solr/integration/SolrUpdateIntegrationTest.java
 ---
    @@ -186,4 +195,114 @@ public void testHugeErrorFields() throws Exception {
         exception.expectMessage("Document contains at least one immense term 
in field=\"error_hash\"");
         getDao().update(errorDoc, Optional.of("error"));
       }
    +
    +  @Test
    +  @Override
    +  public void test() throws Exception {
    --- End diff --
    
    Ok, I found the problem. With my changes, the test data was getting loaded 
into both the ElasticsearchDao and the HBaseDao because I was using a 
MultiIndexDao to load the test data.  
    
    In master, only Elasticsearch gets loaded with the test data.  This was 
causing some of the test assumptions to fail.  I corrected how the data is 
loaded so it only loads Elasticsearch and matches the existing behavior.
    
    Thanks for pointing this out.


> Correct Test Data Load in Elasticsearch Integration Tests
> ---------------------------------------------------------
>
>                 Key: METRON-1845
>                 URL: https://issues.apache.org/jira/browse/METRON-1845
>             Project: Metron
>          Issue Type: Sub-task
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>            Priority: Major
>
> The Elasticsearch integration tests use the legacy Transport client to load 
> test data into the search indexes before running the tests. Loading the test 
> data like this does not accurately reflect how the indices will appear in a 
> production environment.
> This should be changed to use our existing ElasticsearchUpdateDao to write 
> the test data.  This ensures that any changes made to the 'write' portion of 
> our Elasticsearch code will function correctly with the 'read' portion. This 
> ensures that telemetry written into Elasticsearch by 'Indexing' can be read 
> correctly by the Alerts UI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to