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

tasanuma pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new 0967483b HDFS-16184. De-flake 
TestBlockScanner#testSkipRecentAccessFile (#3329)
0967483b is described below

commit 0967483b7c4356f7abe29875ea3d377f62eae307
Author: Viraj Jasani <[email protected]>
AuthorDate: Wed Aug 25 14:07:25 2021 +0530

    HDFS-16184. De-flake TestBlockScanner#testSkipRecentAccessFile (#3329)
    
    Reviewed-by: Ayush Saxena <[email protected]>
    Signed-off-by: Takanobu Asanuma <[email protected]>
    (cherry picked from commit 1b9927afe1dba136ea460ec1417514c0d7815504)
---
 .../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 b34b7df..c747859 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to