提交 ee722777 authored 作者: Thomas Mueller's avatar Thomas Mueller

Test.

上级 ff1a2ce9
...@@ -48,7 +48,7 @@ public class TestLob extends TestBase { ...@@ -48,7 +48,7 @@ public class TestLob extends TestBase {
*/ */
public static void main(String... a) throws Exception { public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init(); TestBase test = TestBase.createCaller().init();
// test.config.big = true; test.config.big = true;
test.test(); test.test();
} }
...@@ -120,7 +120,8 @@ public class TestLob extends TestBase { ...@@ -120,7 +120,8 @@ public class TestLob extends TestBase {
InputStream in = rs.getBinaryStream(1); InputStream in = rs.getBinaryStream(1);
in.skip(i); in.skip(i);
byte[] d2 = new byte[data.length]; byte[] d2 = new byte[data.length];
int l = in.read(d2, i, blockSize); int l = Math.min(blockSize, d2.length - i);
l = in.read(d2, i, l);
if (i >= data.length) { if (i >= data.length) {
assertEquals(-1, l); assertEquals(-1, l);
} else if (i + blockSize >= data.length) { } else if (i + blockSize >= data.length) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论