hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1570745 - /hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestFixedLengthWrapper.java
Date Fri, 21 Feb 2014 23:00:41 GMT
Author: apurtell
Date: Fri Feb 21 23:00:40 2014
New Revision: 1570745

URL: http://svn.apache.org/r1570745
Log:
HBASE-10547 TestFixedLengthWrapper#testReadWrite occasionally fails with the IBM JDK

Modified:
    hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestFixedLengthWrapper.java

Modified: hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestFixedLengthWrapper.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestFixedLengthWrapper.java?rev=1570745&r1=1570744&r2=1570745&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestFixedLengthWrapper.java
(original)
+++ hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestFixedLengthWrapper.java
Fri Feb 21 23:00:40 2014
@@ -17,10 +17,8 @@
  */
 package org.apache.hadoop.hbase.types;
 
-import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
-
-import java.util.Arrays;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.hadoop.hbase.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -54,10 +52,10 @@ public class TestFixedLengthWrapper {
           buff.setPosition(0);
           DataType<byte[]> type = new FixedLengthWrapper<byte[]>(new RawBytes(ord),
limit);
           assertEquals(limit, type.encode(buff, val));
-          byte[] expected = Arrays.copyOf(val, limit);
           buff.setPosition(0);
           byte[] actual = type.decode(buff);
-          assertArrayEquals(expected, actual);
+          assertTrue("Decoding output differs from expected", 
+            Bytes.equals(val, 0, val.length, actual, 0, val.length));
           buff.setPosition(0);
           assertEquals(limit, type.skip(buff));
         }



Mime
View raw message