HDFS-13714. Fix TestNameNodePrunesMissingStorages test failures on Windows. Contributed by Lukas Majercak.

This commit is contained in:
Inigo Goiri 2018-07-02 16:36:25 -07:00
parent fa9ef15ecd
commit 7296b644f7

View File

@ -294,8 +294,9 @@ private static void rewriteVersionFile(File versionFile,
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();