From 8d256c56dbd3d3a2d25fec27b1989f3bf1247688 Mon Sep 17 00:00:00 2001 From: cnauroth Date: Sat, 25 Apr 2015 11:37:27 -0700 Subject: [PATCH] HDFS-8247. TestDiskspaceQuotaUpdate#testAppendOverTypeQuota is failing. Contributed by Xiaoyu Yao. (cherry picked from commit a00e001a1a9fa2c6287b2f078e425e9bb157e5ca) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hdfs/server/namenode/TestDiskspaceQuotaUpdate.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 640c7c929cc..d0e4ab90ed2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -242,6 +242,9 @@ Release 2.8.0 - UNRELEASED HDFS-8211. DataNode UUID is always null in the JMX counter. (Anu Engineer via Arpit Agarwal) + HDFS-8247. TestDiskspaceQuotaUpdate#testAppendOverTypeQuota is failing. + (Xiaoyu Yao via cnauroth) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDiskspaceQuotaUpdate.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDiskspaceQuotaUpdate.java index 15ba15ee171..184cd87f460 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDiskspaceQuotaUpdate.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDiskspaceQuotaUpdate.java @@ -35,6 +35,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.client.HdfsDataOutputStream; import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.HdfsConstants; +import org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException; import org.apache.hadoop.ipc.RemoteException; import org.junit.After; import org.junit.Assert; @@ -250,8 +251,8 @@ public class TestDiskspaceQuotaUpdate { try { DFSTestUtil.appendFile(dfs, file, BLOCKSIZE); Assert.fail("append didn't fail"); - } catch (RemoteException e) { - assertTrue(e.getClassName().contains("QuotaByStorageTypeExceededException")); + } catch (QuotaByStorageTypeExceededException e) { + //ignore } // check that the file exists, isn't UC, and has no dangling lease