milleruntime commented on a change in pull request #2333:
URL: https://github.com/apache/accumulo/pull/2333#discussion_r739475917
##########
File path:
test/src/main/java/org/apache/accumulo/test/functional/ManagerApiIT.java
##########
@@ -210,12 +210,19 @@ public void testPermissions_shutdownTabletServer() throws
Exception {
// see the junit annotation to control test ordering at the top of this class
@Test
public void z99_testPermissions_shutdown() throws Exception {
+ // grab connections before shutting down
+ AccumuloClient rootUserClient = Accumulo.newClient().from(getClientProps())
+ .as(rootUser.getPrincipal(), rootUser.getToken()).build();
+ AccumuloClient privilegedUserClient =
Accumulo.newClient().from(getClientProps())
+ .as(privilegedUser.getPrincipal(), privilegedUser.getToken()).build();
// To shutdown, user needs SystemPermission.SYSTEM
op = user -> client -> client.shutdown(null, user, false);
expectPermissionDenied(op, regularUser);
// We should be able to do both of the following RPC calls before it
actually shuts down
- expectPermissionSuccess(op, rootUser);
- expectPermissionSuccess(op, privilegedUser);
+ expectPermissionSuccess(op, (ClientContext) rootUserClient);
+ expectPermissionSuccess(op, (ClientContext) privilegedUserClient);
+ rootUserClient.close();
+ privilegedUserClient.close();
Review comment:
I spent way too much time getting the formatting to not be hideous so I
hope you appreciate the double try-with-resources in 1f0bcd1
:stuck_out_tongue_winking_eye:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]