[
https://issues.apache.org/jira/browse/HDFS-17927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18086213#comment-18086213
]
ASF GitHub Bot commented on HDFS-17927:
---------------------------------------
smengcl commented on code in PR #8517:
URL: https://github.com/apache/hadoop/pull/8517#discussion_r3359261174
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDiskError.java:
##########
@@ -94,47 +92,21 @@ public void tearDown() throws Exception {
* Test to check that a DN goes down when all its volumes have failed.
*/
@Test
+ @Timeout(value = 60)
public void testShutdown() throws Exception {
- if (System.getProperty("os.name").startsWith("Windows")) {
- /**
- * This test depends on OS not allowing file creations on a directory
- * that does not have write permissions for the user. Apparently it is
- * not the case on Windows (at least under Cygwin), and possibly AIX.
- * This is disabled on Windows.
- */
- return;
- }
- // Bring up two more datanodes
- cluster.startDataNodes(conf, 2, true, null, null);
Review Comment:
Yeah. The other two DNs were used to trigger the failure on the first
datanode. Now that we inject the failure directly we don't need those anymore.
> Make TestDiskError.testShutdown use deterministic volume failure injection
> --------------------------------------------------------------------------
>
> Key: HDFS-17927
> URL: https://issues.apache.org/jira/browse/HDFS-17927
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: test
> Reporter: Siyao Meng
> Assignee: Siyao Meng
> Priority: Major
> Labels: pull-request-available
>
> `TestDiskError.testShutdown()` currently drives DataNode shutdown by
> repeatedly creating files until `dn.isDatanodeUp()` becomes false. If
> shutdown does not happen promptly, the test can loop for a long time and
> generate excessive logs.
> Replaces file-create loop with deterministic failure injection for both
> DataNode data dirs, then explicitly runs `dn.checkDiskError()` and waits for
> the DataNode to exit.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]