Explorar o código

HDFS-14746. Trivial test code update after HDFS-14687. Contributed by kevin su.

Reviewed-by: Surendra Singh Lilhore <surendralilhore@apache.org>
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
(cherry picked from commit abae6ff2a2760500b7e7d4414a43069ed4a45930)
(cherry picked from commit abda5030408d12ba44c8b6df4137bdae6ee0690b)
HUAN-PING SU %!s(int64=5) %!d(string=hai) anos
pai
achega
18f98491e7

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingDataNodeMessages.java

@@ -79,8 +79,8 @@ public class TestPendingDataNodeMessages {
 
 
   @Test
   @Test
   public void testPendingDataNodeMessagesWithEC() throws Exception {
   public void testPendingDataNodeMessagesWithEC() throws Exception {
-    ErasureCodingPolicy ecPolicy = SystemErasureCodingPolicies.getPolicies()
-        .get(3);
+    ErasureCodingPolicy ecPolicy = SystemErasureCodingPolicies
+        .getByID(SystemErasureCodingPolicies.XOR_2_1_POLICY_ID);
     Path dirPath = new Path("/testPendingDataNodeMessagesWithEC");
     Path dirPath = new Path("/testPendingDataNodeMessagesWithEC");
     Configuration conf = new Configuration();
     Configuration conf = new Configuration();
     conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 20 * 60000);
     conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 20 * 60000);