hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r915080 - in /hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop: fs/TestFiRename.java hdfs/server/namenode/RenameAspects.aj
Date Mon, 22 Feb 2010 21:49:44 GMT
Author: suresh
Date: Mon Feb 22 21:49:44 2010
New Revision: 915080

URL: http://svn.apache.org/viewvc?rev=915080&view=rev
Log:
HDFS-913. Rename fault injection test TestRename.java to TestFiRename.java to include it in
tests run by ant target run-test-hdfs-fault-inject. Contributed by Suresh Srinivas.

Modified:
    hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/fs/TestFiRename.java
    hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/hdfs/server/namenode/RenameAspects.aj

Modified: hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/fs/TestFiRename.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/fs/TestFiRename.java?rev=915080&r1=915079&r2=915080&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/fs/TestFiRename.java (original)
+++ hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/fs/TestFiRename.java Mon Feb 22 21:49:44
2010
@@ -47,8 +47,8 @@
  * 
  * This test uses AspectJ to simulate failures.
  */
-public class TestRename {
-  private static final Log LOG = LogFactory.getLog(TestRename.class);
+public class TestFiRename {
+  private static final Log LOG = LogFactory.getLog(TestFiRename.class);
   private static String removeChild = "";
   private static String addChild = "";
   private static byte[] data = { 0 };
@@ -149,11 +149,11 @@
     createFile(src);
 
     // During rename, while removing src, an exception is thrown
-    TestRename.exceptionOnRemove(src.toString());
+    TestFiRename.exceptionOnRemove(src.toString());
     rename(src, dst, true, true, false, Rename.NONE);
 
     // During rename, while adding dst an exception is thrown
-    TestRename.exceptionOnAdd(dst.toString());
+    TestFiRename.exceptionOnAdd(dst.toString());
     rename(src, dst, true, true, false, Rename.NONE);
   }
 
@@ -166,15 +166,15 @@
     createFile(dst);
 
     // During rename, while removing src, an exception is thrown
-    TestRename.exceptionOnRemove(src.toString());
+    TestFiRename.exceptionOnRemove(src.toString());
     rename(src, dst, true, true, true, Rename.OVERWRITE);
 
     // During rename, while removing dst, an exception is thrown
-    TestRename.exceptionOnRemove(dst.toString());
+    TestFiRename.exceptionOnRemove(dst.toString());
     rename(src, dst, true, true, true, Rename.OVERWRITE);
 
     // During rename, while adding dst an exception is thrown
-    TestRename.exceptionOnAdd(dst.toString());
+    TestFiRename.exceptionOnAdd(dst.toString());
     rename(src, dst, true, true, true, Rename.OVERWRITE);
   }
 

Modified: hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/hdfs/server/namenode/RenameAspects.aj
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/hdfs/server/namenode/RenameAspects.aj?rev=915080&r1=915079&r2=915080&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/hdfs/server/namenode/RenameAspects.aj
(original)
+++ hadoop/hdfs/trunk/src/test/aop/org/apache/hadoop/hdfs/server/namenode/RenameAspects.aj
Mon Feb 22 21:49:44 2010
@@ -20,7 +20,7 @@
 import org.apache.commons.logging.*;
 import org.apache.hadoop.hdfs.server.namenode.INode;
 import org.apache.hadoop.fs.Options.Rename;
-import org.apache.hadoop.fs.TestRename;
+import org.apache.hadoop.fs.TestFiRename;
 import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
 
 /**
@@ -41,7 +41,7 @@
   before(INode[] inodes, int pos) throws RuntimeException :
     callRemove(inodes, pos) {
     LOG.info("FI: callRenameRemove");
-    if (TestRename.throwExceptionOnRemove(inodes[pos].getLocalName())) {
+    if (TestFiRename.throwExceptionOnRemove(inodes[pos].getLocalName())) {
       throw new RuntimeException("RenameAspects - on remove " + 
           inodes[pos].getLocalName());
     }
@@ -58,7 +58,7 @@
       throws RuntimeException : 
       callAddChildNoQuotaCheck(inodes, pos, node, diskspace, flag) {
     LOG.info("FI: callAddChildNoQuotaCheck");
-    if (TestRename.throwExceptionOnAdd(inodes[pos].getLocalName())) {
+    if (TestFiRename.throwExceptionOnAdd(inodes[pos].getLocalName())) {
       throw new RuntimeException("RenameAspects on add " + 
           inodes[pos].getLocalName());
     }



Mime
View raw message