hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1076073 - in /hadoop/hdfs/branches/HDFS-1052: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMXBean.java
Date Wed, 02 Mar 2011 01:16:14 GMT
Author: szetszwo
Date: Wed Mar  2 01:16:14 2011
New Revision: 1076073

URL: http://svn.apache.org/viewvc?rev=1076073&view=rev
Log:
HDFS-1625. Ignore disk space values in TestDataNodeMXBean.

Modified:
    hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMXBean.java

Modified: hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/CHANGES.txt?rev=1076073&r1=1076072&r2=1076073&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/CHANGES.txt (original)
+++ hadoop/hdfs/branches/HDFS-1052/CHANGES.txt Wed Mar  2 01:16:14 2011
@@ -444,7 +444,9 @@ Release 0.22.0 - Unreleased
 
     HDFS-1440. Fix TestComputeInvalidateWork failure. (suresh)
 
-Release 0.21.0 - Unreleased
+    HDFS-1625. Ignore disk space values in TestDataNodeMXBean.  (szetszwo)
+
+Release 0.21.1 - Unreleased
 
     HDFS-1411. Correct backup node startup command in hdfs user guide.
     (Ching-Shen Chen via shv)

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMXBean.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMXBean.java?rev=1076073&r1=1076072&r2=1076073&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMXBean.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMXBean.java
Wed Mar  2 01:16:14 2011
@@ -26,7 +26,7 @@ import javax.management.ObjectName;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
 
 /**
  * Class for testing {@link DataNodeMXBean} implementation
@@ -62,9 +62,14 @@ public class TestDataNodeMXBean {
       Assert.assertEquals(datanode.getNamenodeAddresses(),namenodeAddresses);
       // get attribute "getVolumeInfo"
       String volumeInfo = (String)mbs.getAttribute(mxbeanName, "VolumeInfo");
-      Assert.assertEquals(datanode.getVolumeInfo(),volumeInfo);
+      Assert.assertEquals(replaceDigits(datanode.getVolumeInfo()),
+          replaceDigits(volumeInfo));
     } finally {
       if (cluster != null) {cluster.shutdown();}
     }
   }
+  
+  private static String replaceDigits(final String s) {
+    return s.replaceAll("[0-9]+", "_DIGITS_");
+  }
 }



Mime
View raw message