hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [3/5] hadoop git commit: HDFS-13559. TestBlockScanner does not close TestContext properly. Contributed by Anbang Hu.
Date Thu, 17 May 2018 02:25:10 GMT
HDFS-13559. TestBlockScanner does not close TestContext properly. Contributed by Anbang Hu.

(cherry picked from commit 454de3b543c8b00a9ab566c7d1c64d7e4cffee0f)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fcf0b6a8
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fcf0b6a8
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fcf0b6a8

Branch: refs/heads/branch-3.0
Commit: fcf0b6a8dd443b9ef811d71d7a8cf18ab7627eda
Parents: 16e89a2
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Wed May 16 19:23:02 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Wed May 16 19:24:00 2018 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hdfs/server/datanode/TestBlockScanner.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/fcf0b6a8/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java
----------------------------------------------------------------------
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 b627800..1e92a5d 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
@@ -125,6 +125,7 @@ public class TestBlockScanner {
       if (cluster != null) {
         for (int i = 0; i < numNameServices; i++) {
           dfs[i].delete(new Path("/test"), true);
+          dfs[i].close();
         }
         cluster.shutdown();
       }
@@ -817,6 +818,7 @@ public class TestBlockScanner {
           "in recentSuspectBlocks.", info.goodBlocks.contains(first));
       info.blocksScanned = 0;
     }
+    ctx.close();
   }
 
   /**
@@ -873,6 +875,7 @@ public class TestBlockScanner {
       info.blocksScanned = 0;
     }
     info.sem.release(1);
+    ctx.close();
   }
 
   /**
@@ -933,12 +936,12 @@ public class TestBlockScanner {
     os.write(bytes);
     os.hflush();
     os.close();
-    fs.close();
 
     // verify that volume scanner does not find bad blocks after append.
     waitForRescan(info, numExpectedBlocks);
 
     GenericTestUtils.setLogLevel(DataNode.LOG, Level.INFO);
+    ctx.close();
   }
 
   private void waitForRescan(final TestScanResultHandler.Info info,


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


Mime
View raw message