private void setupExternalTableTest() throws Exception {
    runStatementOnDriver("drop table if exists manwhnone");
    runStatementOnDriver("drop table if exists manoutnone");
    runStatementOnDriver("drop table if exists manwhwh");
    runStatementOnDriver("drop table if exists manwhout");
    runStatementOnDriver("drop table if exists manwhmixed");
    runStatementOnDriver("drop table if exists manoutout");
    runStatementOnDriver("drop table if exists extwhnone");
    runStatementOnDriver("drop table if exists extoutnone");
    runStatementOnDriver("drop table if exists extwhwh");
    runStatementOnDriver("drop table if exists extwhout");
    runStatementOnDriver("drop table if exists extwhmixed");
    runStatementOnDriver("drop table if exists extoutout");
    runStatementOnDriver("drop table if exists custdb.custmanwhwh");
    runStatementOnDriver("drop table if exists custdb.custextwhwh");
    runStatementOnDriver("create table manwhnone (a string)");
    runStatementOnDriver("create table manoutnone (a string) location '" + EXTERNAL_TABLE_LOCATION
      + "/manoutnone'");
    runStatementOnDriver("create table manwhwh (a string) partitioned by (p string)");
    runStatementOnDriver("alter table manwhwh add partition (p='p1')");
    runStatementOnDriver("alter table manwhwh add partition (p='p2')");
    runStatementOnDriver("create table manwhout (a string) partitioned by (p string)");
    runStatementOnDriver("alter table manwhout add partition (p='p1') location '" + EXTERNAL_TABLE_LOCATION
      + "/manwhoutp1'");
    runStatementOnDriver("alter table manwhout add partition (p='p2') location '" + EXTERNAL_TABLE_LOCATION
      + "/manwhoutp2'");
    runStatementOnDriver("create table manwhmixed (a string) partitioned by (p string)");
    runStatementOnDriver("alter table manwhmixed add partition (p='p1') location '" + EXTERNAL_TABLE_LOCATION
      + "/manwhmixedp1'");
    runStatementOnDriver("alter table manwhmixed add partition (p='p2')");
    runStatementOnDriver("create table manoutout (a string) partitioned by (p string) location '" +
      EXTERNAL_TABLE_LOCATION + "/manoutout'");
    runStatementOnDriver("alter table manoutout add partition (p='p1')");
    runStatementOnDriver("alter table manoutout add partition (p='p2')");
    runStatementOnDriver("create external table extwhnone (a string)");
    runStatementOnDriver("create external table extoutnone (a string) location '" + EXTERNAL_TABLE_LOCATION
      + "/extoutnone'");
    runStatementOnDriver("create external table extwhwh (a string) partitioned by (p string)");
    runStatementOnDriver("alter table extwhwh add partition (p='p1')");
    runStatementOnDriver("alter table extwhwh add partition (p='p2')");
    runStatementOnDriver("create external table extwhout (a string) partitioned by (p string)");
    runStatementOnDriver("alter table extwhout add partition (p='p1') location '" + EXTERNAL_TABLE_LOCATION
      + "/extwhoutp1'");
    runStatementOnDriver("alter table extwhout add partition (p='p2') location '" + EXTERNAL_TABLE_LOCATION
      + "/extwhoutp2'");
    runStatementOnDriver("create external table extwhmixed (a string) partitioned by (p string)");
    runStatementOnDriver("alter table extwhmixed add partition (p='p1') location '" + EXTERNAL_TABLE_LOCATION
      + "/extwhmixedp1'");
    runStatementOnDriver("alter table extwhmixed add partition (p='p2')");
    runStatementOnDriver("create external table extoutout (a string) partitioned by (p string) location '"
      + EXTERNAL_TABLE_LOCATION + "/extoutout'");
    runStatementOnDriver("alter table extoutout add partition (p='p1')");
    runStatementOnDriver("alter table extoutout add partition (p='p2')");
    runStatementOnDriver("drop database if exists custdb");
    runStatementOnDriver("create database custdb");
    runStatementOnDriver("create table custdb.custmanwhwh (a string) partitioned by (p string)");
    runStatementOnDriver("alter table custdb.custmanwhwh add partition (p='p1')");
    runStatementOnDriver("alter table custdb.custmanwhwh add partition (p='p2')");
    runStatementOnDriver("create external table custdb.custextwhwh (a string) partitioned by (p string)");
    runStatementOnDriver("alter table custdb.custextwhwh add partition (p='p1')");
    runStatementOnDriver("alter table custdb.custextwhwh add partition (p='p2')");
  }
Should encounter a DB with an unset owner, and should try to chown the new dir path to 'hive' user.
This will always fail in this test, as we're never running it as root.
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/util/TestHiveStrictManagedMigration.java