From 54cdde38c7f3ca56ebfdad914a93be232a41a261 Mon Sep 17 00:00:00 2001 From: Oleg Danilov Date: Tue, 18 Jun 2019 09:11:25 +0300 Subject: [PATCH] HDFS-12314. Typo in the TestDataNodeHotSwapVolumes.testAddOneNewVolume(). Contributed by Oleg Danilov. --- .../hadoop/hdfs/server/datanode/TestDataNodeHotSwapVolumes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeHotSwapVolumes.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeHotSwapVolumes.java index 6672cd2375..e72c499624 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeHotSwapVolumes.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeHotSwapVolumes.java @@ -416,7 +416,7 @@ public void testAddOneNewVolume() minNumBlocks = Math.min(minNumBlocks, blockList.getNumberOfBlocks()); maxNumBlocks = Math.max(maxNumBlocks, blockList.getNumberOfBlocks()); } - assertTrue(Math.abs(maxNumBlocks - maxNumBlocks) <= 1); + assertTrue(Math.abs(maxNumBlocks - minNumBlocks) <= 1); verifyFileLength(cluster.getFileSystem(), testFile, numBlocks); }