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 14:57:38 UTC

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

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