Fix TestDFSStripedInputStreamWithRandomECPolicy (#4296)

This commit is contained in:
daimin 2022-05-11 07:56:53 +08:00 committed by GitHub
parent 1e043b937a
commit bb398f78cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -669,7 +669,12 @@ public class TestDFSStripedInputStream {
@Test @Test
public void testBlockReader() throws Exception { public void testBlockReader() throws Exception {
ecPolicy = StripedFileTestUtil.getDefaultECPolicy(); // RS-6-3-1024k ErasureCodingPolicy targetPolicy = StripedFileTestUtil.getDefaultECPolicy(); // RS-6-3-1024k
if (!ecPolicy.equals(targetPolicy)) {
// Be sure not affected by random EC policy from
// TestDFSStripedInputStreamWithRandomECPolicy.
return;
}
int fileSize = 19 * cellSize + 100; int fileSize = 19 * cellSize + 100;
long stripeSize = (long) dataBlocks * cellSize; long stripeSize = (long) dataBlocks * cellSize;
byte[] bytes = StripedFileTestUtil.generateBytes(fileSize); byte[] bytes = StripedFileTestUtil.generateBytes(fileSize);