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

Hudson commented on HBASE-11050:
--------------------------------

ABORTED: Integrated in HBase-TRUNK #5108 (See 
[https://builds.apache.org/job/HBase-TRUNK/5108/])
HBASE-11050 Replace empty catch block in 
TestHLog#testFailedToCreateHLogIfParentRenamed with @Test(expected=) (Gustavo) 
(tedyu: rev 1589331)
* 
/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java


> Replace empty catch block in TestHLog#testFailedToCreateHLogIfParentRenamed 
> with @Test(expected=) 
> --------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-11050
>                 URL: https://issues.apache.org/jira/browse/HBASE-11050
>             Project: HBase
>          Issue Type: Task
>            Reporter: Gustavo Anatoly
>            Assignee: Gustavo Anatoly
>            Priority: Trivial
>             Fix For: 0.99.0
>
>         Attachments: HBASE-11050.patch
>
>
> This change refactor TestHLog#testFailedToCreateHLogIfParentRenamed. The test 
> basically create {{HLogFactory.createWALWriter(fs, path, conf);}} and after 
> that parent {{path}} is renamed followed to another call 
> {{HLogFactory.createWALWriter(fs, path, conf);}} in this moment is expected 
> IOException, because the parent {{path}} doesn't exist more.
> The second call monitored by a block try-catch with an empty {{catch}}:
> {code}
>  try {
>       HLogFactory.createWALWriter(fs, path, conf);
>       fail("It should fail to create the new WAL");
>     } catch (IOException ioe) {
>       // expected, good.
>     }
> {code}
> The patch proposed removes the {{try-catch}} and use 
> {{@Test(expected=IOException.class)}} to capture exception produced by the 
> test.
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to