@Test
public void appendMultiThreadedTest() throws Exception
{
IFileSystem fs = new MultiThreadedFileSystem(Constants.ROOT_PATH);
fs.create(0);
fs.open();
Block[] blocks = new Block[NUM_OF_BLOCKS_TO_APPEND];
String testStr = "<test> <content> Hello world! </content> </test>";
byte[] content = testStr.getBytes();
for (int i = 0; i < NUM_OF_BLOCKS_TO_APPEND; i++) {
Block b = new Block(new BlockId(0));
b.setBytes(content);
blocks[i] = b;
}
long startMs = System.currentTimeMillis();
fs.append(blocks, false);
long endMs = System.currentTimeMillis();
System.out.println(endMs - startMs + "ms");