Browse Source

HADOOP-2040 Hudson hangs AFTER test has finished
Second commit against this jira


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@595406 13f79535-47bb-0310-9956-ffa450edef68

Michael Stack 17 years ago
parent
commit
3e6e2a7d1d

+ 13 - 8
src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java

@@ -78,14 +78,14 @@ public class TestHRegion extends HBaseTestCase implements RegionUnavailableListe
   private static final Text CONTENTS_BODY = new Text("contents:body");
   private static final Text CONTENTS_BODY = new Text("contents:body");
   private static final Text CONTENTS_FIRSTCOL = new Text("contents:firstcol");
   private static final Text CONTENTS_FIRSTCOL = new Text("contents:firstcol");
   private static final Text ANCHOR_SECONDCOL = new Text("anchor:secondcol");
   private static final Text ANCHOR_SECONDCOL = new Text("anchor:secondcol");
-  
-  private static MiniDFSCluster cluster = null;
-  private static FileSystem fs = null;
-  private static Path parentdir = null;
-  private static Path newlogdir = null;
-  private static HLog log = null;
-  private static HTableDescriptor desc = null;
-  static HRegion region = null;
+
+  private MiniDFSCluster cluster = null;
+  private FileSystem fs = null;
+  private Path parentdir = null;
+  private Path newlogdir = null;
+  private HLog log = null;
+  private HTableDescriptor desc = null;
+  HRegion region = null;
   
   
   private static int numInserted = 0;
   private static int numInserted = 0;
 
 
@@ -825,6 +825,11 @@ public class TestHRegion extends HBaseTestCase implements RegionUnavailableListe
       e.printStackTrace();
       e.printStackTrace();
     }
     }
     if (cluster != null) {
     if (cluster != null) {
+      try {
+        fs.close();
+      } catch (IOException e) {
+        e.printStackTrace();
+      }
       cluster.shutdown();
       cluster.shutdown();
       cluster = null;
       cluster = null;
     }
     }