HBASE-10180 TestByteBufferIOEngine#testByteBufferIOEngine occasionally fails
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1551497 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fec8ee413b
commit
215899873f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue