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

Duo Zhang commented on HBASE-19873:
-----------------------------------

I was also thinking about doing this by some surefire magic but failed.

On the RunListener, how do you get the statement object and replace it through 
the Description object passed in? If you means that you want to change the test 
class and add a field at runtime, this is a runtime byte code rewriting, not a 
simple reflection. You need javasist or something else to do this. And I’m 
afraid that it will not work since the class has already been loaded before.

I was also thinking a way which is similar, instrumentation. But I can not find 
a maven plugin which can do instrumentation. All search results are about test 
coverage...

Thanks.

> Add a CategoryBasedTimeout ClassRule for all UTs
> ------------------------------------------------
>
>                 Key: HBASE-19873
>                 URL: https://issues.apache.org/jira/browse/HBASE-19873
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Major
>             Fix For: 2.0.0-beta-2
>
>         Attachments: HBASE-19873-v1.patch
>
>
> So that our test can timeout as expected without making the surefire plugin 
> kill other tests.



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

Reply via email to