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

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

GitHub user merrimanr opened a pull request:

    https://github.com/apache/metron/pull/941

    METRON-1355: Convert metron-elasticsearch to new infrastructure

    ## Contributor Comments
    This PR switches metron-elasticsearch integration tests from using 
in-memory components to the e2e Docker infrastructure.  A high-level summary of 
the changes:
    
    - Updated travis to only run the metron-elasticsearch tests
    - Updated the Elasticsearch Docker image to the same version as Metron
    - Removed the requirement to build a base "metron-centos" image.  Removes 
an extra Docker build step and I'm not sure caching this helps much anyways.
    - Updated each integration test to use index names that are namespaced with 
the test class name
    - Replaced the in-memory component setup with an Elasticsearch client 
configured for the Elasticsearch Docker container
    - Added steps to setup/delete indices before/after each test
    - Moved Elasticsearch in-memory helper methods and common integration tests 
methods to a utils class
    - Fixed a minor bug in the ElasticsearchMetaAlertDao class where the index 
is always hardcoded to "metaalert"
    - Added some initial documentation for the metron-docker-e2e module
    
    The scope of this PR are 3 of the 4 metron-elasticsearch integration tests:
    
    - 
org.apache.metron.elasticsearch.integration.ElasticsearchMetaAlertIntegrationTest
    - 
org.apache.metron.elasticsearch.integration.ElasticsearchSearchIntegrationTest
    - 
org.apache.metron.elasticsearch.integration.ElasticsearchUpdateIntegrationTest
    
    Most of the test logic in 
org.apache.metron.elasticsearch.integration.ElasticsearchIndexingIntegrationTest
 is actually in metron-indexing so that test will be updated when we convert 
that module.
    
    At this point only the metron-elasticsearch tests are run in travis.  My 
plan is to slowly add tests for each module until we reach feature parity with 
master.  At that point the "install" section of .travis.yml will be the same.  
The alerts ui e2e tests were removed for now until the work being done to 
stabilize them is complete.
    
    The ES in-memory component starts up pretty fast so performance improved 
for the 3 tests by about 7 seconds.  Curious to hear what people think.
    
    ## Pull Request Checklist
    
    Thank you for submitting a contribution to Apache Metron.  
    Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
    Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 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:
    - [x] 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).
    - [x] 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.
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    
    ### For code changes:
    - [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
    - [x] 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:
      ```
      mvn -q clean integration-test install && 
dev-utilities/build-utils/verify_licenses.sh 
      ```
    
    - [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
    - [x] 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?
    
    ### 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`:
    
      ```
      cd site-book
      mvn site
      ```
    
    #### 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](https://travis-ci.org) is set up 
for your personal repository such that your branches are built there before 
submitting a pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/merrimanr/incubator-metron METRON-1355

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metron/pull/941.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #941
    
----
commit a5fc2a1aa11616591227e8ce950e672df2694698
Author: merrimanr <merrimanr@...>
Date:   2018-02-20T22:13:25Z

    Merge remote-tracking branch 'mirror/master' into 
feature/METRON-1344-test-infrastructure
    
    # Conflicts:
    #   .travis.yml
    #   metron-interface/metron-alerts/e2e/utils/e2e_util.ts
    #   
metron-platform/metron-elasticsearch/src/test/java/org/apache/metron/elasticsearch/integration/ElasticsearchSearchIntegrationTest.java
    #   
metron-platform/metron-indexing/src/test/java/org/apache/metron/indexing/dao/SearchIntegrationTest.java

commit 14a573f7743c9be92f852284a1a859c24cb117ae
Author: merrimanr <merrimanr@...>
Date:   2018-02-22T17:31:59Z

    initial commit

commit 09c8193b2dc71d37f3e1730f83053e3f196b2d2b
Author: merrimanr <merrimanr@...>
Date:   2018-02-22T18:06:54Z

    wait for ES container to come up

commit 1b40e51ca89728647b668e051c67ac1e21abb367
Author: merrimanr <merrimanr@...>
Date:   2018-02-22T20:20:00Z

    Merge remote-tracking branch 
'mirror/feature/METRON-1344-test-infrastructure' into METRON-1355
    
    # Conflicts:
    #   .travis.yml
    #   
metron-platform/metron-elasticsearch/src/test/java/org/apache/metron/elasticsearch/integration/ElasticsearchSearchIntegrationTest.java
    #   
metron-platform/metron-indexing/src/test/java/org/apache/metron/indexing/dao/SearchIntegrationTest.java

----


> Convert metron-elasticsearch to new infrastructure
> --------------------------------------------------
>
>                 Key: METRON-1355
>                 URL: https://issues.apache.org/jira/browse/METRON-1355
>             Project: Metron
>          Issue Type: Sub-task
>            Reporter: Ryan Merriman
>            Assignee: Ryan Merriman
>            Priority: Major
>
> Integration tests need to be converted to use the new infrastructure.  This 
> includes:
> # Updating clients with new infrastructure urls
> # Adding a namespace to any assets the tests depend on
> # Cleaning up interactions with old in memory infrastructure



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

Reply via email to