diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index d471ec9..d809a96 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -3367,7 +3367,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { /** * This method clones the passed c configuration setting a new * user into the clone. Use it getting new instances of FileSystem. Only - * works for DistributedFileSystem. + * works for DistributedFileSystem w/o Kerberos. * @param c Initial configuration * @param differentiatingSuffix Suffix to differentiate this user from others. * @return A new configuration instance with a different user set into it. @@ -3377,7 +3377,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { final String differentiatingSuffix) throws IOException { FileSystem currentfs = FileSystem.get(c); - if (!(currentfs instanceof DistributedFileSystem)) { + if (!(currentfs instanceof DistributedFileSystem) || User.isHBaseSecurityEnabled(c)) { return User.getCurrent(); } // Else distributed filesystem. Make a new instance per daemon. Below