HDFS-16041. TestErasureCodingCLI fails (#3052)

This commit is contained in:
Hui Fei 2021-05-26 19:12:17 +08:00 committed by GitHub
parent 986d0a4f1d
commit 98a74e2351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -466,7 +466,9 @@ private String formatSize(long size, boolean humanReadable) {
* @return Constant-width String representation of Erasure Coding Policy
*/
public String toErasureCodingPolicy() {
return String.format(ERASURECODING_POLICY_FORMAT, erasureCodingPolicy);
return String.format(ERASURECODING_POLICY_FORMAT,
erasureCodingPolicy.equals("Replicated")
? erasureCodingPolicy : "EC:" + erasureCodingPolicy);
}
/**

View File

@ -983,7 +983,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
<expected-output>( |\t)*1( |\t)*2( |\t)*0 EC:[A-Za-z0-9-]{1,}( )*/dir1</expected-output>
<expected-output>( |\t)*1( |\t)*2( |\t)*0( )*EC:[A-Za-z0-9-]{1,}( )*/dir1</expected-output>
</comparator>
</comparators>
</test>
@ -1004,7 +1004,7 @@
</comparator>
<comparator>
<type>RegexpComparator</type>
<expected-output>( |\t)*0( |\t)*1( |\t)*0 [A-Za-z0-9-]{1,}( )*/file1</expected-output>
<expected-output>( |\t)*0( |\t)*1( |\t)*0( )*[A-Za-z0-9-]{1,}( )*/file1</expected-output>
</comparator>
</comparators>
</test>