Kaynağa Gözat

HADOOP-874: remove failing assertion in WASB ownership tests.

cnauroth 11 yıl önce
ebeveyn
işleme
8511798a14

+ 1 - 14
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/azurenative/NativeAzureFileSystemBaseTest.java

@@ -109,23 +109,10 @@ public abstract class NativeAzureFileSystemBaseTest {
     testOwnership(testFolder);
   }
 
-  private boolean checkUserInGroup(String group, UserGroupInformation userInfo){
-    // Check if user is in a specific group.
-  	for (String usergroup : userInfo.getGroupNames()){
-  	  if (usergroup.equals(group)){
-  	      // A user group name corresponds to one of the group name.
-          return true;
-        }
-  	}
-
-  	// None of the user group names correspond to the specific group.
-  	return false;
-  }
   private void testOwnership(Path pathUnderTest) throws IOException {
     FileStatus ret = fs.getFileStatus(pathUnderTest);
     UserGroupInformation currentUser = UserGroupInformation.getCurrentUser();
-    assertTrue(ret.getOwner().equals(currentUser.getShortUserName()) &&
-    		       checkUserInGroup(ret.getGroup(), currentUser));
+    assertTrue(ret.getOwner().equals(currentUser.getShortUserName()));
     fs.delete(pathUnderTest, true);
   }