From 39fa2c93c49f7b96340643d973195dbe89583518 Mon Sep 17 00:00:00 2001 From: Sneha Vijayarajan Date: Thu, 26 Nov 2020 15:41:25 +0530 Subject: [PATCH] HADOOP-17396. ABFS: testRenameFileOverExistingFile fails (#2491) Contributed by Sneha Vijayarajan. Change-Id: I57a866b95ff18229caee8a6028874074a29cb5bd --- .../azurebfs/contract/ITestAbfsFileSystemContractRename.java | 5 +++++ hadoop-tools/hadoop-azure/src/test/resources/azure-test.xml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/ITestAbfsFileSystemContractRename.java b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/ITestAbfsFileSystemContractRename.java index b92bef68a0..cd60e6d5ae 100644 --- a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/ITestAbfsFileSystemContractRename.java +++ b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/contract/ITestAbfsFileSystemContractRename.java @@ -38,6 +38,11 @@ public ITestAbfsFileSystemContractRename() throws Exception { public void setup() throws Exception { binding.setup(); super.setup(); + // Base rename contract test class re-uses the test folder + // This leads to failures when the test is re-run as same ABFS test + // containers are re-used for test run and creation of source and + // destination test paths fail, as they are already present. + binding.getFileSystem().delete(binding.getTestPath(), true); } @Override diff --git a/hadoop-tools/hadoop-azure/src/test/resources/azure-test.xml b/hadoop-tools/hadoop-azure/src/test/resources/azure-test.xml index d43d67e7b5..069b13e146 100644 --- a/hadoop-tools/hadoop-azure/src/test/resources/azure-test.xml +++ b/hadoop-tools/hadoop-azure/src/test/resources/azure-test.xml @@ -38,6 +38,11 @@ false + + fs.contract.rename-returns-false-if-dest-exists + true + +