This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c2d00c8  HDFS-13131. Modifying testcase 
testEnableAndDisableErasureCodingPolicy. Contributed by chencan.
c2d00c8 is described below

commit c2d00c84508ac9af2272843547046a27b23f3bb5
Author: Wei-Chiu Chuang <[email protected]>
AuthorDate: Thu Aug 1 19:11:43 2019 -0700

    HDFS-13131. Modifying testcase testEnableAndDisableErasureCodingPolicy. 
Contributed by chencan.
---
 .../test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
index d09ad02..a27ed78 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
@@ -1926,10 +1926,12 @@ public class TestDistributedFileSystem {
       fs.addErasureCodingPolicies(policies);
       assertEquals(policyName, ErasureCodingPolicyManager.getInstance().
           getByName(policyName).getName());
-      fs.disableErasureCodingPolicy(policyName);
       fs.enableErasureCodingPolicy(policyName);
       assertEquals(policyName, ErasureCodingPolicyManager.getInstance().
-          getByName(policyName).getName());
+          getEnabledPolicyByName(policyName).getName());
+      fs.disableErasureCodingPolicy(policyName);
+      assertNull(ErasureCodingPolicyManager.getInstance().
+          getEnabledPolicyByName(policyName));
 
       //test enable a policy that doesn't exist
       try {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to