You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/09/29 03:20:36 UTC

[GitHub] [couchdb] jiangphcn opened a new pull request #3178: Add module tag to elixir test cases

jiangphcn opened a new pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178


   
   
   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   Some elixir test cases don't have actual module tag. Add tags to help include or exclude them in CI test.
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provides any behaviour that the end users
        could notice? -->
   make elixir
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  -->
   
   ## Checklist
   
   - [X] Code is written and works correctly
   - [ X Changes are covered by tests
   - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] dottorblaster commented on pull request #3178: Add module tag to elixir test cases

Posted by GitBox <gi...@apache.org>.
dottorblaster commented on pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178#issuecomment-700490939


   We already did a bit of categorization with @iilyak, `:cluster` and `:single_node` for example were meant for that purpose 😅 Maybe we need to put up a stronger naming convention?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] jiangphcn merged pull request #3178: Add module tag to elixir test cases

Posted by GitBox <gi...@apache.org>.
jiangphcn merged pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] jiangphcn commented on pull request #3178: Add module tag to elixir test cases

Posted by GitBox <gi...@apache.org>.
jiangphcn commented on pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178#issuecomment-700501397


   The `kind` related tag is still kept. We just want to add new module tags to give fine-grained classification for elixir test cases.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] jiangphcn commented on pull request #3178: Add module tag to elixir test cases

Posted by GitBox <gi...@apache.org>.
jiangphcn commented on pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178#issuecomment-701450231


   thanks to all of you, @dottorblaster, @jjrodrig and @iilyak. Let me merge for now and we can make further classification later.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] iilyak commented on pull request #3178: Add module tag to elixir test cases

Posted by GitBox <gi...@apache.org>.
iilyak commented on pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178#issuecomment-700766752


   JFYI: It is also possible to run individual tests within the module
   
   ```
   make elixir tests=test/elixir/test/basics_test.exs:155
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] iilyak commented on pull request #3178: Add module tag to elixir test cases

Posted by GitBox <gi...@apache.org>.
iilyak commented on pull request #3178:
URL: https://github.com/apache/couchdb/pull/3178#issuecomment-700763385


   I've noticed that most of the tags in this PR ended up to be unique ones. The only exceptions is `docs` which I bet used somewhere else. This means the granularity level is a single module. I am not sure it useful to do it by module. We can run tests for a single module already. We also can run tests for list of modules as well:
   
   ```
   make elixir tests=test/elixir/test/basics_test.exs,test/elixir/test/replication_test.exs,test/elixir/test/map_test.exs,test/elixir/test/all_docs_test.exs,test/elixir/test/bulk_docs_test.exs
   ```
   
   I think the better grouping would be based on the big features of CouchDB we intend to test. Let's say a developer is updating the view engine. In this case he/she would be interested in running all tests for view functionality. Because changes in that area might break related functionality. So I propose to look at tagging using following heuristics (just an idea and subject for discussion):
   
   - tag which is set on a single module is an exception not a norm
   - think about what component (or feature) of CouchDB given module tests to come up with a tag
     - we can use cover information to assist as initially but it could be an overkill
   - determine where (in which erlang application) the endpoint we test from given test module is handled and tag after application name (`mango`, `mem3`, `setup`, `deyfus`)
       ```
       find src/ -name '*_httpd_handlers.erl' | xargs grep '_handler(' | grep -v no_match |  cut -d':' -f2
       url_handler(<<"_membership">>) -> fun mem3_httpd
       url_handler(<<"_reshard">>) -> fun mem3_reshard_httpd
       db_handler(<<"_shards">>) -> fun mem3_httpd
       db_handler(<<"_sync_shards">>)   -> fun mem3_httpd
       url_handler(<<"_cluster_setup">>) -> fun setup_httpd
       db_handler(<<"_index">>)        -> fun mango_httpd
       db_handler(<<"_explain">>)      -> fun mango_httpd
       db_handler(<<"_find">>)         -> fun mango_httpd
       db_handler(<<"_index">>)        -> fun mango_httpd
       db_handler(<<"_explain">>)      -> fun mango_httpd
       db_handler(<<"_find">>)         -> fun mango_httpd
       url_handler(<<"_search_analyze">>) -> fun dreyfus_httpd
       db_handler(<<"_search_cleanup">>)  -> fun dreyfus_httpd
       design_handler(<<"_search">>)      -> fun dreyfus_httpd
       design_handler(<<"_search_info">>) -> fun dreyfus_httpd
       ...
       ```


----------------------------------------------------------------
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:
users@infra.apache.org