hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjus...@apache.org
Subject svn commit: r1551497 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestByteBufferIOEngine.java
Date Tue, 17 Dec 2013 10:11:53 GMT
Author: zjushch
Date: Tue Dec 17 10:11:53 2013
New Revision: 1551497

URL: http://svn.apache.org/r1551497
Log:
HBASE-10180 TestByteBufferIOEngine#testByteBufferIOEngine occasionally fails

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestByteBufferIOEngine.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestByteBufferIOEngine.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestByteBufferIOEngine.java?rev=1551497&r1=1551496&r2=1551497&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestByteBufferIOEngine.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestByteBufferIOEngine.java
Tue Dec 17 10:11:53 2013
@@ -43,6 +43,9 @@ public class TestByteBufferIOEngine {
     for (int i = 0; i < testNum; i++) {
       byte val = (byte) (Math.random() * 255);
       int blockSize = (int) (Math.random() * maxBlockSize);
+      if (blockSize == 0) {
+        blockSize = 1;
+      }
       byte[] byteArray = new byte[blockSize];
       for (int j = 0; j < byteArray.length; ++j) {
         byteArray[j] = val;



Mime
View raw message