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

Appy commented on HBASE-15689:
------------------------------

Corrected shellcheck and whitespace in v2.
As for testing, i don't know how to run it with yetus, doesn't seem trivial at 
all. So i locally tested just the lines being added.
Created a script temp.sh containing the changes (copied in the end). Ran a few 
commands in terminal to make sure it works. Also uncovered an error with the 
wget flag (-O instead of -o), attaching patch v3.
{noformat}
appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh


appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → export extra="<other 
flags>"

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh
<other flags>

## Setting to correct url
appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → export 
EXCLUDE_TESTS_URL="http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/excludes";

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh
--2016-04-25 13:18:47--  
http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/excludes
Resolving github.mtv.cloudera.com... 172.20.45.33
Connecting to github.mtv.cloudera.com|172.20.45.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 425 [text/plain]
Saving to: 'excludes'

excludes                                    
100%[=============================================================================================>]
     425  --.-KB/s   in 0s

2016-04-25 13:18:47 (57.9 MB/s) - 'excludes' saved [425/425]

<other flags> 
-Dtest.exclude.pattern=**/TestEncryptionKeyRotation.java,**/TestFailedAppendAndSync.java,**/TestRegionServerHostname.java,**/TestFanOutOneBlockAsyncDFSOutput.java,**/TestFlushWithThroughputController.java,**/TestPerColumnFamilyFlush.java,**/TestPerColumnFamilyFlush.java,**/TestMasterFailoverWithProcedures.java,**/TestMasterFailoverWithProcedures.java,**/TestHRegion.java,**/TestRegionServerHostname.java,**/TestFlushWithThroughputController.java,

## Setting to wrong url
appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → export 
EXCLUDE_TESTS_URL="http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/excl";

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh
--2016-04-25 13:18:56--  
http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/excl
Resolving github.mtv.cloudera.com... 172.20.45.33
Connecting to github.mtv.cloudera.com|172.20.45.33|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-04-25 13:18:56 ERROR 404: Not Found.

Wget error 1 in fetching excludes file from url 
http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/excl. Ignoring 
and proceeding.
<other flags>

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → export 
EXCLUDE_TESTS_URL=

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh
<other flags>

## Setting to correct url
appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → export 
INCLUDE_TESTS_URL="http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/includes";

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh
--2016-04-25 13:19:13--  
http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/includes
Resolving github.mtv.cloudera.com... 172.20.45.33
Connecting to github.mtv.cloudera.com|172.20.45.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 329 [text/plain]
Saving to: 'includes'

includes                                    
100%[=============================================================================================>]
     329  --.-KB/s   in 0s

2016-04-25 13:19:13 (39.2 MB/s) - 'includes' saved [329/329]

<other flags> 
-Dtest=TestEncryptionKeyRotation,TestFailedAppendAndSync,TestRegionServerHostname,TestFanOutOneBlockAsyncDFSOutput,TestFlushWithThroughputController,TestPerColumnFamilyFlush,TestPerColumnFamilyFlush,TestMasterFailoverWithProcedures,TestMasterFailoverWithProcedures,TestHRegion,TestRegionServerHostname,TestFlushWithThroughputController,

## Setting to wrong url
appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → export 
INCLUDE_TESTS_URL="http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/incl";

appy@asharma-MBP ~/apache/hbase/dev-support  (flaky2) → ./temp.sh
--2016-04-25 13:19:23--  
http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/incl
Resolving github.mtv.cloudera.com... 172.20.45.33
Connecting to github.mtv.cloudera.com|172.20.45.33|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-04-25 13:19:23 ERROR 404: Not Found.

Wget error 1 in fetching includes file from url 
http://github.mtv.cloudera.com/raw/appy/hbase/temp/dev-support/incl. Ignoring 
and proceeding.
<other flags>
{noformat}

{noformat}
This is temp.sh

#!/bin/bash
if [[ -n "$EXCLUDE_TESTS_URL" ]]; then
    wget "$EXCLUDE_TESTS_URL" -O "excludes"
    if [[ $? -eq 0 ]]; then
      excludes=$(cat excludes)
      if [[ -n "${excludes}" ]]; then
        extra="${extra} -Dtest.exclude.pattern=${excludes}"
      fi
    else
      echo "Wget error $? in fetching excludes file from url" \
           "${EXCLUDE_TESTS_URL}. Ignoring and proceeding."
    fi
elif [[ -n "$INCLUDE_TESTS_URL" ]]; then
    wget "$INCLUDE_TESTS_URL" -O "includes"
    if [[ $? -eq 0 ]]; then
      includes=$(cat includes)
      if [[ -n "${includes}" ]]; then
        extra="${extra} -Dtest=${includes}"
      fi
    else
      echo "Wget error $? in fetching includes file from url" \
           "${INCLUDE_TESTS_URL}. Ignoring and proceeding."
    fi
fi
echo $extra
{noformat}

> Changes to hbase-personality.sh to include/exclude flaky tests
> --------------------------------------------------------------
>
>                 Key: HBASE-15689
>                 URL: https://issues.apache.org/jira/browse/HBASE-15689
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Appy
>            Assignee: Appy
>         Attachments: HBASE-15689-master-v2.patch, HBASE-15689-master.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to