hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11030) HBaseTestingUtility.getMiniHBaseCluster should be able to return null
Date Sat, 19 Apr 2014 06:19:15 GMT

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

Hudson commented on HBASE-11030:
--------------------------------

FAILURE: Integrated in HBase-0.98 #284 (See [https://builds.apache.org/job/HBase-0.98/284/])
HBASE-11030 HBaseTestingUtility.getMiniHBaseCluster should be able to return null. (larsh:
rev 1588614)
* /hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java


> HBaseTestingUtility.getMiniHBaseCluster should be able to return null
> ---------------------------------------------------------------------
>
>                 Key: HBASE-11030
>                 URL: https://issues.apache.org/jira/browse/HBASE-11030
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.99.0, 0.94.19, 0.98.2, 0.96.3
>
>         Attachments: 11030-trunk.txt
>
>
> Right now we have this logic:
> {code}
>   public MiniHBaseCluster getMiniHBaseCluster() {
>     if (this.hbaseCluster instanceof MiniHBaseCluster) {
>       return (MiniHBaseCluster)this.hbaseCluster;
>     }
>     throw new RuntimeException(hbaseCluster + " not an instance of " +
>                                MiniHBaseCluster.class.getName());
>   }
> {code}
> Since null is not actually an instance of MiniHBaseCluster we'll throw the RuntimeException
rather than returning null.
> Some tests call this method and check for null, which is pointless.



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

Mime
View raw message