amaliujia commented on a change in pull request #320:
URL: https://github.com/apache/incubator-ratis/pull/320#discussion_r535886656
##########
File path:
ratis-examples/src/test/java/org/apache/ratis/examples/filestore/FileStoreStreamingBaseTest.java
##########
@@ -72,9 +77,30 @@ public void testFileStoreStream() throws Exception {
final CheckedSupplier<FileStoreClient, IOException> newClient =
() -> new FileStoreClient(cluster.getGroup(), getProperties(),
raftPeer);
- // TODO: configurable buffer size
- final int bufferSize = 10_000;
- testSingleFile("foo", SizeInBytes.valueOf("2M"), bufferSize, newClient);
+
+ testSingleFile("foo", SizeInBytes.valueOf("2M"), 10_000, newClient);
+ testSingleFile("foo", SizeInBytes.valueOf("2M"), 1000, newClient);
+ testSingleFile("foo", SizeInBytes.valueOf("20M"), 100_000, newClient);
Review comment:
My impression was the RandomAccessFile will overwrite existing file.
After some research, it seems that when there is an existing file,
RandomAccessFile only overwrites for the top of the file and leaves the rest of
it.
So I have updated to use different file names to make the test more robust.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]