You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ga...@apache.org on 2025/05/05 18:48:59 UTC
(hadoop) branch trunk updated: HADOOP-19558. Skip testRenameFileBeingAppended on Windows (#7666)
This is an automated email from the ASF dual-hosted git repository.
gaurava pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new b0a71903ae6 HADOOP-19558. Skip testRenameFileBeingAppended on Windows (#7666)
b0a71903ae6 is described below
commit b0a71903ae609c69d34e90af72a9e176e9998b02
Author: Gautham B A <ga...@gmail.com>
AuthorDate: Tue May 6 00:18:51 2025 +0530
HADOOP-19558. Skip testRenameFileBeingAppended on Windows (#7666)
* The `AbstractContractAppendTest#testRenameFileBeingAppended()`
tries to rename the file while the handle
to the file is open.
* This isn't allowed on Windows, and thus the
call to rename fails.
* Thus, we need to skip this test on Windows.
---
.../fs/contract/rawlocal/TestRawlocalContractAppend.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractAppend.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractAppend.java
index cb917f4ba6a..5e75f00b871 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractAppend.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractAppend.java
@@ -18,7 +18,10 @@
package org.apache.hadoop.fs.contract.rawlocal;
+import org.junit.Assume;
+
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.contract.AbstractContractAppendTest;
import org.apache.hadoop.fs.contract.AbstractFSContract;
@@ -29,4 +32,12 @@ protected AbstractFSContract createContract(Configuration conf) {
return new RawlocalFSContract(conf);
}
+ @Override
+ public void testRenameFileBeingAppended() throws Throwable {
+ // Renaming a file while its handle is open is not supported on Windows.
+ // Thus, this test should be skipped on Windows.
+ Assume.assumeFalse(Path.WINDOWS);
+
+ super.testRenameFileBeingAppended();
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org