labels table is created by VisibilityController#postStartMaster().

You can add the following call in the @BeforeClass method:


    TEST_UTIL.waitTableEnabled(LABELS_TABLE_NAME.getName(), 50000);


See TestVisibilityLabelsWithACL for complete example.



On Thu, Feb 22, 2018 at 12:07 PM, Mike Thomsen <mikerthom...@gmail.com>
wrote:

> I'm trying to spin up a mini cluster for integration testing. Can someone
> give me an idea of what I'm doing wrong?
>
>     public static void main(String[] args) throws Throwable {
>
>         Configuration conf =
> org.apache.hadoop.hbase.HBaseConfiguration.create();
>         conf.set("hbase.coprocessor.region.classes",
> "org.apache.hadoop.hbase.security.visibility.VisibilityController");
>         conf.set("hbase.coprocessor.master.classes",
> "org.apache.hadoop.hbase.security.visibility.VisibilityController");
>
>         utility = new HBaseTestingUtility(conf);
>
>         utility.startMiniCluster();
>
>         VisibilityClient.addLabels(utility.getConnection(), new String[]{
> "X", "Y", "Z" });
>     }
>
> That results in this:
>
> org.apache.hadoop.hbase.TableNotFoundException: hbase:labels
>
> Thanks,
>
> Mike
>

Reply via email to