[
https://issues.apache.org/jira/browse/HBASE-21076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16586336#comment-16586336
]
Sean Busbey commented on HBASE-21076:
-------------------------------------
showed up in nightly for all branches that got HBASE-20940 right after it
landed, which added these calls to TEST_UTIL.
we shouldn't have TestTableResource reaching into a test class in a different
module like this.
> TestTableResource fails with NPE
> --------------------------------
>
> Key: HBASE-21076
> URL: https://issues.apache.org/jira/browse/HBASE-21076
> Project: HBase
> Issue Type: Test
> Components: REST, test
> Affects Versions: 3.0.0, 1.5.0, 1.3.3, 2.0.2, 2.1.1, 1.4.7
> Reporter: Ted Yu
> Assignee: Sean Busbey
> Priority: Major
>
> The following can be observed in master branch:
> {code}
> java.lang.NullPointerException
> at
> org.apache.hadoop.hbase.rest.TestTableResource.setUpBeforeClass(TestTableResource.java:134)
> {code}
> The NPE comes from the following in TestEndToEndSplitTransaction :
> {code}
> compactAndBlockUntilDone(TEST_UTIL.getAdmin(),
> TEST_UTIL.getMiniHBaseCluster().getRegionServer(0),
> daughterA.getRegionName());
> {code}
> Initial check of the code shows that TestEndToEndSplitTransaction uses
> TEST_UTIL instance which is created within TestEndToEndSplitTransaction.
> However, TestTableResource creates its own instance of HBaseTestingUtility.
> Meaning TEST_UTIL.getMiniHBaseCluster() would return null, since the instance
> created by TestEndToEndSplitTransaction has hbaseCluster as null.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)