Skip to content

Commit

Permalink
Clean defensively within finally block
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Aug 27, 2019
1 parent 7727323 commit c975920
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void testRevokeRoleFromOwner()
row("alice", "USER", "alice", "USER", "hive", "default", "test_table", "INSERT", "YES", null)));
}
finally {
onPrestoAlice().executeQuery("DROP TABLE hive.default.test_table");
onPrestoAlice().executeQuery("DROP TABLE IF EXISTS hive.default.test_table");
}
}

Expand Down Expand Up @@ -687,8 +687,8 @@ public void testAdminCanShowAllGrants()
row("alice", "USER", "bob", "USER", "hive", "default", "test_table_alice", "INSERT", "NO", null)));
}
finally {
onPrestoAlice().executeQuery("DROP TABLE hive.default.test_table_alice");
onPrestoAlice().executeQuery("DROP TABLE hive.default.test_table_bob");
onPrestoAlice().executeQuery("DROP TABLE IF EXISTS hive.default.test_table_alice");
onPrestoAlice().executeQuery("DROP TABLE IF EXISTS hive.default.test_table_bob");
onPresto().executeQuery("REVOKE admin FROM alice");
}
}
Expand Down Expand Up @@ -728,9 +728,9 @@ public void testAdminCanShowGrantsOnlyFromCurrentSchema()
row("alice", "USER", "alice", "USER", "hive", "test", "test_table_bob", "INSERT", "YES", null)));
}
finally {
onPresto().executeQuery("DROP TABLE hive.default.test_table_bob");
onPrestoAlice().executeQuery("DROP TABLE hive.test.test_table_bob");
onPresto().executeQuery("DROP SCHEMA hive.test");
onPresto().executeQuery("DROP TABLE IF EXISTS hive.default.test_table_bob");
onPrestoAlice().executeQuery("DROP TABLE IF EXISTS hive.test.test_table_bob");
onPresto().executeQuery("DROP SCHEMA IF EXISTS hive.test");
onPresto().executeQuery("REVOKE admin FROM alice");
}
}
Expand Down

0 comments on commit c975920

Please sign in to comment.