[ https://issues.apache.org/jira/browse/HBASE-11050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981566#comment-13981566 ]
Ted Yu commented on HBASE-11050: -------------------------------- I think this would be closed when hbase 1.0 is released. > 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)