From 8204ad9d5b6f40c73d3024d5a0171972dab48e02 Mon Sep 17 00:00:00 2001
From: bilaharith <52483117+bilaharith@users.noreply.github.com>
Date: Tue, 12 Jan 2021 19:30:48 +0530
Subject: [PATCH] HADOOP-17459. ADLS Gen1: Fixes for rename contract tests
#2607
Contributed by Bilaharith
---
.../fs/adl/live/TestAdlContractRenameLive.java | 14 --------------
.../src/test/resources/adls.xml | 5 +++++
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/live/TestAdlContractRenameLive.java b/hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/live/TestAdlContractRenameLive.java
index 3e3a010e17..f684629b5d 100644
--- a/hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/live/TestAdlContractRenameLive.java
+++ b/hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/live/TestAdlContractRenameLive.java
@@ -19,13 +19,9 @@
package org.apache.hadoop.fs.adl.live;
-import org.junit.Test;
-
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.contract.AbstractContractRenameTest;
import org.apache.hadoop.fs.contract.AbstractFSContract;
-import org.apache.hadoop.security.AccessControlException;
-import org.apache.hadoop.test.LambdaTestUtils;
/**
* Test rename contract test cases on Adl file system.
@@ -37,14 +33,4 @@ protected AbstractFSContract createContract(Configuration configuration) {
return new AdlStorageContract(configuration);
}
- /**
- * ADL throws an Access Control Exception rather than return false.
- * This is caught and its error text checked, to catch regressions.
- */
- @Test
- public void testRenameFileUnderFile() throws Exception {
- LambdaTestUtils.intercept(AccessControlException.class,
- "Parent path is not a folder.",
- super::testRenameFileUnderFile);
- }
}
diff --git a/hadoop-tools/hadoop-azure-datalake/src/test/resources/adls.xml b/hadoop-tools/hadoop-azure-datalake/src/test/resources/adls.xml
index 5bbdd6fbb8..43de5bb918 100644
--- a/hadoop-tools/hadoop-azure-datalake/src/test/resources/adls.xml
+++ b/hadoop-tools/hadoop-azure-datalake/src/test/resources/adls.xml
@@ -38,6 +38,11 @@
true
+
+ fs.contract.rename-returns-false-if-dest-exists
+ true
+
+
fs.contract.test.random-seek-count
10