@AfterClass
  public static void afterClass() throws Exception {
    envSetup.getTestCtx().hiveConf.set("hive.test.authz.sstd.hs2.mode", "false");
    envSetup.getTestCtx().hiveConf.set("hive.security.authorization.enabled", "false");
    envSetup.getTestCtx().hiveConf.set("hive.users.in.admin.role", "user1");

    IDriver driver = createDriver();
    dropTables(driver);
  }
ScheduledQuery integration test.

Checks for more complex scenarios; like impersonation works when scheduled queries are executed.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/schq/TestScheduledQueryIntegration.java