You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by to...@apache.org on 2022/05/10 00:01:23 UTC
[hadoop] branch trunk updated: Fix TestDFSStripedInputStreamWithRandomECPolicy (#4291)
This is an automated email from the ASF dual-hosted git repository.
tomscut 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 d486ae8c0ff Fix TestDFSStripedInputStreamWithRandomECPolicy (#4291)
d486ae8c0ff is described below
commit d486ae8c0ffeb5127c504ef45795c3c14e3f5b5c
Author: daimin <da...@outlook.com>
AuthorDate: Tue May 10 08:01:16 2022 +0800
Fix TestDFSStripedInputStreamWithRandomECPolicy (#4291)
---
.../java/org/apache/hadoop/hdfs/TestDFSStripedInputStream.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedInputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedInputStream.java
index 12cfd49a0bd..2369d42482a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedInputStream.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStripedInputStream.java
@@ -669,7 +669,12 @@ public class TestDFSStripedInputStream {
@Test
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;
long stripeSize = (long) dataBlocks * cellSize;
byte[] bytes = StripedFileTestUtil.generateBytes(fileSize);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org