Skip to content

Commit d355b36

Browse files
committed
JAVA-378: Added unit test
1 parent 55769c4 commit d355b36

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/com/mongodb/gridfs/GridFSTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ public void testBadChunkSize() throws Exception {
198198
assertArrayEquals(randomBytes, savedFileBytes);
199199
}
200200

201+
@Test(groups = {"basic"})
202+
public void getBigChunkSize() throws Exception {
203+
GridFSInputFile file = _fs.createFile("512kb_bucket");
204+
file.setChunkSize(file.getChunkSize() * 2);
205+
OutputStream os = file.getOutputStream();
206+
for (int i = 0; i < 1024; i++) {
207+
os.write(new byte[GridFS.DEFAULT_CHUNKSIZE / 1024 + 1]);
208+
}
209+
os.close();
210+
}
211+
212+
201213
@Test(groups = {"basic"})
202214
public void testInputStreamSkipping() throws Exception {
203215
//int chunkSize = 5;

0 commit comments

Comments
 (0)