hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1358804 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/test/java/org/apache/hadoop/hdfs/TestHDFSTrash.java
Date Sun, 08 Jul 2012 18:15:31 GMT
Author: eli
Date: Sun Jul  8 18:15:30 2012
New Revision: 1358804

URL: http://svn.apache.org/viewvc?rev=1358804&view=rev
Log:
HDFS-3603. Decouple TestHDFSTrash from TestTrash. Contributed by Jason Lowe

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSTrash.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1358804&r1=1358803&r2=1358804&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Sun Jul  8 18:15:30 2012
@@ -178,7 +178,7 @@ Trunk (unreleased changes)
     HDFS-3541. Deadlock between recovery, xceiver and packet responder (Vinay via umamahesh)
 
 Branch-2 ( Unreleased changes )
- 
+
   INCOMPATIBLE CHANGES
 
     HDFS-3446. HostsFileReader silently ignores bad includes/excludes
@@ -439,6 +439,8 @@ Branch-2 ( Unreleased changes )
     so that V conforms to boolean compiling HttpFSServer.java with OpenJDK 
     (adi2 via tucu)
 
+    HDFS-3603. Decouple TestHDFSTrash from TestTrash. (Jason Lowe via eli)
+
 Release 2.0.0-alpha - 05-23-2012
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSTrash.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSTrash.java?rev=1358804&r1=1358803&r2=1358804&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSTrash.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSTrash.java
Sun Jul  8 18:15:30 2012
@@ -19,46 +19,45 @@ package org.apache.hadoop.hdfs;
 
 import java.io.IOException;
 
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.TestTrash;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
  * This class tests commands from Trash.
  */
-public class TestHDFSTrash extends TestTrash {
-
+public class TestHDFSTrash {
   private static MiniDFSCluster cluster = null;
-  public static Test suite() {
-    TestSetup setup = new TestSetup(new TestSuite(TestHDFSTrash.class)) {
-      protected void setUp() throws Exception {
-        Configuration conf = new HdfsConfiguration();
-        cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
-      }
-      protected void tearDown() throws Exception {
-        if (cluster != null) { cluster.shutdown(); }
-      }
-    };
-    return setup;
+
+  @BeforeClass
+  public static void setUp() throws Exception {
+    Configuration conf = new HdfsConfiguration();
+    cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();
+  }
+
+  @AfterClass
+  public static void tearDown() {
+    if (cluster != null) { cluster.shutdown(); }
   }
 
   /**
    * Tests Trash on HDFS
    */
+  @Test
   public void testTrash() throws IOException {
-    trashShell(cluster.getFileSystem(), new Path("/"));
+    TestTrash.trashShell(cluster.getFileSystem(), new Path("/"));
   }
 
+  @Test
   public void testNonDefaultFS() throws IOException {
     FileSystem fs = cluster.getFileSystem();
     Configuration conf = fs.getConf();
     conf.set(DFSConfigKeys.FS_DEFAULT_NAME_KEY, fs.getUri().toString());
-    trashNonDefaultFS(conf);
+    TestTrash.trashNonDefaultFS(conf);
   }
 
 }



Mime
View raw message