lujiefsi edited a comment on pull request #2809:
URL: https://github.com/apache/hbase/pull/2809#issuecomment-750380940


   @virajjasani 
   I try to use  code  "hbck = TEST_UTIL.getConnection(USER_NONE).getHbck()" to 
gain the hbck, but UT still failed to pass. So I perfer to commit this PR 
without UT as its patch works fine in a real cluster. 
   I do not know why we get the wrong user at serve side, may be it is a bug in 
mini-cluster, but if that, we need a new pull request to fix it. Anyway, i 
attach the test code,  if someone figures out the root cause, plese let me 
konw, thanks.
   
     @Test
     public void testUnauthorizedSetTableStateInMeta() throws Exception {
       AccessTestAction action = new AccessTestAction() {
         @Override public Object run() throws Exception {
           Hbck hbck = TEST_UTIL.getHbck();
           hbck.setTableStateInMeta(new TableState(TEST_TABLE, 
TableState.State.DISABLED));
           return null;
         }
       };
       verifyDenied(action, USER_CREATE, USER_OWNER, USER_RW, USER_RO, 
USER_NONE, USER_GROUP_READ,
           USER_GROUP_WRITE, USER_GROUP_CREATE);
     }
   
     @Test
     public void testUnauthorizedFixMeta() throws Exception {
       AccessTestAction action = new AccessTestAction() {
         @Override public Object run() throws Exception {
           Hbck hbck = TEST_UTIL.getHbck();
           hbck.fixMeta();
           return null;
         }
       };
       verifyDenied(action, USER_CREATE, USER_OWNER, USER_RW, USER_RO, 
USER_NONE, USER_GROUP_READ,
           USER_GROUP_WRITE, USER_GROUP_CREATE);
     }
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to