HDFS-13131. Modifying testcase testEnableAndDisableErasureCodingPolicy. Contributed by chencan.

This commit is contained in:
Wei-Chiu Chuang 2019-08-01 19:11:43 -07:00
parent e20b19543b
commit c2d00c8450

View File

@ -1926,10 +1926,12 @@ public void testEnableAndDisableErasureCodingPolicy() throws Exception {
fs.addErasureCodingPolicies(policies); fs.addErasureCodingPolicies(policies);
assertEquals(policyName, ErasureCodingPolicyManager.getInstance(). assertEquals(policyName, ErasureCodingPolicyManager.getInstance().
getByName(policyName).getName()); getByName(policyName).getName());
fs.disableErasureCodingPolicy(policyName);
fs.enableErasureCodingPolicy(policyName); fs.enableErasureCodingPolicy(policyName);
assertEquals(policyName, ErasureCodingPolicyManager.getInstance(). 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 //test enable a policy that doesn't exist
try { try {