You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/26 01:51:43 UTC

[GitHub] [ozone] GeorgeJahad edited a comment on pull request #2948: HDDS-6140. Selective checks: skip unit check for integration-test changes

GeorgeJahad edited a comment on pull request #2948:
URL: https://github.com/apache/ozone/pull/2948#issuecomment-1021720905


   Your PR adds "integration-test" only.  I was thinking we should try to add "unit-test" only as well.  I'm including my attempt below to see if you think it is worth pursuing:
   https://github.com/adoroszlai/hadoop-ozone/compare/HDDS-6140...GeorgeJahad:HDDS-6140-unit-only
   
   The approach is that there should be one function that triggers integration tests only, and one function that triggers unit tests only.  Files that don't match either of those regex's should trigger a complete test run.  For the first function, I changed get_count_junit_files() to get_count_integration_test_files().  For the second I used the existing check_needs_unit_test().
   
   
   On examining the get_count_junit_files() function, it looks like that is really only used for getting the count of integration test files.  So I changed the name to get_count_integration_test_files(), and fixed some of the other variable names.
   
   *check_needs_unit_test()* serves two purposes.  The first to match all tests but integration tests.  The second is to not include all other nontest in the set of "matched_files" so that COUNT_CORE_OTHER_CHANGED_FILES  > 0, which triggers a complete rebuild.
   
   I want it to only find real unit tests, so I changed the regex accordingly, and then invoked filter_changed_files() with the true parameter, (which adds the files found to the matched files.)  So now check_needs_unit_test() only adds the "unit" flag to the BASIC_CHECKS var if a unit test file has changed.
   
   Finally, in calculate_test_types_to_run() if COUNT_CORE_OTHER_CHANGED_FILES is > 0, I also set the unit flag there.  That way, if only a unit test file has changed COUNT_CORE_OTHER_CHANGED_FILES will be 0 and the other tests won't be triggered.
   
   Not sure if that makes sense, but I thought it worth exploring.  Let me know what you think.
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org