hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Question about Writing Unit Tests for JIRA 10950
Date Wed, 16 Apr 2014 17:30:58 GMT
There is no patch posted so I don't know what classes you're modifying.

If the changes are mostly in hbase-client module, the test(s) should be in
the same module.

w.r.t. Configuration, you can obtain it using the following code where
TEST_UTIL is an instance of HBaseTestingUtility:

    Configuration conf = TEST_UTIL.getConfiguration();

Refer to existing tests such as TestFromClientSide


On Wed, Apr 16, 2014 at 10:22 AM, Enoch Hsu <ehsu@us.ibm.com> wrote:

> Hi All,
> I am looking into JIRA 10950 and I have a couple questions about writing
> unit tests for the patch.
> Where should the unit tests go in terms of module and package location?
> e.g. hbase-server, hbase-client, etc
> Another thing I observed while trying to write unit tests is that
> HBaseTestingUtility has its own configuration files
> that are used once the minicluster is started, and, unless I pass the
> minicluster's configuration file to my code,
> any new Configuration() calls will not get the same configuration as the
> minicluster.
> Is there any way to get HBaseTestingUtility and HBaseConfiguration.create()
> to interact with each other without passing the conf object around?
> Or is there another way I should be going about writing unit tests for
> this?
> Thanks,
> Enoch Hsu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message