hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1428105 - in /hadoop/common/branches/branch-1: CHANGES.txt src/test/org/apache/hadoop/io/TestWritableName.java
Date Wed, 02 Jan 2013 23:16:18 GMT
Author: suresh
Date: Wed Jan  2 23:16:18 2013
New Revision: 1428105

URL: http://svn.apache.org/viewvc?rev=1428105&view=rev
Log:
HADOOP-9175. TestWritableName fails with Open JDK 7. Contributed by Arpit Agarwal.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/test/org/apache/hadoop/io/TestWritableName.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1428105&r1=1428104&r2=1428105&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Wed Jan  2 23:16:18 2013
@@ -376,6 +376,9 @@ Release 1.2.0 - unreleased
     HADOOP-9174. TestSecurityUtil fails with Open JDK 7. (Arpit Agarwal via
     suresh)
 
+    HADOOP-9175. TestWritableName fails with Open JDK 7. (Arpit Agarwal via
+    suresh)
+
 Release 1.1.2 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/test/org/apache/hadoop/io/TestWritableName.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/test/org/apache/hadoop/io/TestWritableName.java?rev=1428105&r1=1428104&r2=1428105&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/test/org/apache/hadoop/io/TestWritableName.java (original)
+++ hadoop/common/branches/branch-1/src/test/org/apache/hadoop/io/TestWritableName.java Wed
Jan  2 23:16:18 2013
@@ -66,29 +66,25 @@ public class TestWritableName extends Te
 
   public void testGoodName() throws Exception {
     Configuration conf = new Configuration();
-    Class<?> test = WritableName.getClass("long",conf);
+    Class<?> test = WritableName.getClass("long", conf);
     assertTrue(test != null);
   }
 
-  public void testSetName() throws Exception {
+  public void testAddNames() throws Exception {
     Configuration conf = new Configuration();
-    WritableName.setName(SimpleWritable.class, testName);
 
+    // Add a name, check it works.
+    WritableName.setName(SimpleWritable.class, testName);
     Class<?> test = WritableName.getClass(testName,conf);
     assertTrue(test.equals(SimpleWritable.class));
-  }
-
 
-  public void testAddName() throws Exception {
-    Configuration conf = new Configuration();
+    // Add a new name, check it works.
     String altName = testName + ".alt";
-
     WritableName.addName(SimpleWritable.class, altName);
-
-    Class<?> test = WritableName.getClass(altName, conf);
+    test = WritableName.getClass(altName, conf);
     assertTrue(test.equals(SimpleWritable.class));
 
-    // check original name still works
+    // Check that the original name still works.
     test = WritableName.getClass(testName, conf);
     assertTrue(test.equals(SimpleWritable.class));
 
@@ -103,5 +99,5 @@ public class TestWritableName extends Te
       assertTrue(e.getMessage().matches(".*unknown_junk.*"));
     }
   }
-	
+
 }



Mime
View raw message