You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2018/02/07 23:50:00 UTC

[jira] [Commented] (HBASE-19955) Put back CategoryBased test method timeout Annotation

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

stack commented on HBASE-19955:
-------------------------------

Thanks Appy I don't think Inheritance works for these annotations. Will check in a sec....

Meantime parking some hackery:

Put back in place the @Rule
find hbase-/src/test -name *.java |xargs perl -pi -e 's/(HBaseClassTestRule.forClass(([^.])\.class)/$1\n @Rule\n public final TestRule TIMEOUT =\n CategoryBasedTimeout.forClass($2.class);/g'
Add import for CategoryBasedTimeout
find hbase-*/src/test -name *.java |xargs perl -pi -e 's/(import org\.apache\.hadoop\.hbase\.HBaseClassTestRule/import org.apache.hadoop.hbase.CategoryBasedTimeout;\n$1/g'
Add import for TimeRule...
find hbase-*/src/test -name *.java |xargs perl -pi -e 's/(import org\.junit\.experimental\.categories\.Category/$1\nimport org.junit.rules.TestRule;/g'
Add Rule...
find hbase-*/src/test -name *.java |xargs perl -pi -e 's/(import org\.junit\.ClassRule/$1\nimport org.junit.Rule;/g'

Above might violate CheckStyle for import order in a few cases.

> Put back CategoryBased test method timeout Annotation
> -----------------------------------------------------
>
>                 Key: HBASE-19955
>                 URL: https://issues.apache.org/jira/browse/HBASE-19955
>             Project: HBase
>          Issue Type: Sub-task
>          Components: test
>            Reporter: stack
>            Priority: Major
>         Attachments: 0001-HBASE-19955-Put-back-CategoryBased-test-method-timeo.patch
>
>
> See parent issue. If we decide to put back method-based timeouts, here's a patch.



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