You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2018/08/20 15:33:00 UTC

[jira] [Created] (HBASE-21076) TestTableResource fails with NPE

Ted Yu created HBASE-21076:
------------------------------

             Summary: TestTableResource fails with NPE
                 Key: HBASE-21076
                 URL: https://issues.apache.org/jira/browse/HBASE-21076
             Project: HBase
          Issue Type: Test
            Reporter: Ted Yu


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)