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 ta...@apache.org on 2021/08/25 08:37:50 UTC

[hadoop] branch trunk updated: HDFS-16184. De-flake TestBlockScanner#testSkipRecentAccessFile (#3329)

This is an automated email from the ASF dual-hosted git repository.

tasanuma 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 1b9927a  HDFS-16184. De-flake TestBlockScanner#testSkipRecentAccessFile (#3329)
1b9927a is described below

commit 1b9927afe1dba136ea460ec1417514c0d7815504
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Wed Aug 25 14:07:25 2021 +0530

    HDFS-16184. De-flake TestBlockScanner#testSkipRecentAccessFile (#3329)
    
    Reviewed-by: Ayush Saxena <ay...@apache.org>
    Signed-off-by: Takanobu Asanuma <ta...@apache.org>
---
 .../java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java
index fdbcb51..e1473fb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java
@@ -1004,6 +1004,8 @@ public class TestBlockScanner {
         TestScanResultHandler.getInfo(ctx.volumes.get(0));
     synchronized (info) {
       info.shouldRun = true;
+      info.sem = new Semaphore(1);
+      info.sem.acquire();
       info.notify();
     }
     try {
@@ -1017,6 +1019,7 @@ public class TestBlockScanner {
       LOG.debug("Timeout for all files are accessed in last period.");
     }
     synchronized (info) {
+      info.sem.release();
       info.shouldRun = false;
       info.notify();
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org