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

(cherry picked from commit 7296b644f7)
This commit is contained in:
Inigo Goiri 2018-07-02 16:36:25 -07:00
parent 8ffc191f61
commit 177ccbc43f
1 changed files with 3 additions and 2 deletions

View File

@ -294,8 +294,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();