hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [5/5] hadoop git commit: HDFS-13714. Fix TestNameNodePrunesMissingStorages test failures on Windows. Contributed by Lukas Majercak.
Date Mon, 02 Jul 2018 23:39:32 GMT
HDFS-13714. Fix TestNameNodePrunesMissingStorages test failures on Windows. Contributed by
Lukas Majercak.

(cherry picked from commit 7296b644f7c44400f03995668573a4cfd2ee552c)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/692292e3
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/692292e3
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/692292e3

Branch: refs/heads/branch-2.9
Commit: 692292e303f31460fbfefb16b35a33428083f66d
Parents: bdf9e29
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Mon Jul 2 16:36:25 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Mon Jul 2 16:38:56 2018 -0700

----------------------------------------------------------------------
 .../blockmanagement/TestNameNodePrunesMissingStorages.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/692292e3/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestNameNodePrunesMissingStorages.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestNameNodePrunesMissingStorages.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestNameNodePrunesMissingStorages.java
index 68a0d6d..ababdbc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestNameNodePrunesMissingStorages.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestNameNodePrunesMissingStorages.java
@@ -289,8 +289,9 @@ public class TestNameNodePrunesMissingStorages {
       in = null;
       out.close();
       out = null;
-      newVersionFile.renameTo(versionFile);
-      success = true;
+      // Delete old version file
+      success = versionFile.delete();
+      success &= newVersionFile.renameTo(versionFile);
     } finally {
       if (in != null) {
         in.close();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message