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

Sean Busbey commented on HBASE-20838:
-------------------------------------

the file that needs to change is at {{dev-support/hbase-personality.sh}}. 
Specifically the method that needs to be update is this one:

{code}
## @description  Queue up modules for this personality
## @audience     private
## @stability    evolving
## @param        repostatus
## @param        testtype
function personality_modules
{code}

This is the method that tells Apache Yetus which modules need to run for a 
given test.

Within the method we keep track of which modules to run with this variable:

{code}
local MODULES=("${CHANGED_MODULES[@]}")
{code}

Here in the declaration we start it off being equivalent to what Yetus provides 
us as the list of modules with changes.

In the rest of the method we have various checks for specific kinds of tests 
that need different things. e.g. "If you're doing findbugs don't bother running 
against the hbase-shell module" or "if the hbase-checkstyle module has changed 
then run the checkstyle test at the top of the project instead of for any 
particular module."

The method currently doesn't make use of it, but Yetus also provides a list of 
all the files that changed in a global array variable named {{CHANGED_FILES}}. 
I believe the correct thing to do is to start with the block for "if we're 
running unit tests do this prep work"

{code}
  # If EXCLUDE_TESTS_URL/INCLUDE_TESTS_URL is set, fetches the url
  # and sets -Dtest.exclude.pattern/-Dtest to exclude/include the
  # tests respectively.
  if [[ ${testtype} == unit ]]; then
    local tests_arg=""
    get_include_exclude_tests_arg tests_arg
    extra="${extra} -PrunAllTests ${tests_arg}"

    # Inject the jenkins build-id for our surefire invocations
    # Used by zombie detection stuff, even though we're not including that yet.
    if [ -n "${BUILD_ID}" ]; then
      extra="${extra} -Dbuild.id=${BUILD_ID}"
    fi
  fi
{code}

And add an additional stanza after the BUILD_ID stuff that basically says "If 
the set of changed files includes CommonFSUtils then add the hbase-server 
module to the set of modules to be tested". we'll also need to check that we're 
not doing a full build and that neither the hbase-server nor "top of project" 
are already in the set of modules to test.

> Move all setStorage related UT cases from TestFSUtils to TestCommonFSUtils
> --------------------------------------------------------------------------
>
>                 Key: HBASE-20838
>                 URL: https://issues.apache.org/jira/browse/HBASE-20838
>             Project: HBase
>          Issue Type: Test
>            Reporter: Yu Li
>            Assignee: Yu Li
>            Priority: Major
>
> As per 
> [discussed|https://issues.apache.org/jira/browse/HBASE-20691?focusedCommentId=16517662&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16517662]
>  in HBASE-20691, since the setStoragePolicy code is in CommonFSUtils, the 
> test should be in TestCommonFSUtils



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

Reply via email to