use of org.apache.jackrabbit.oak.segment.file.ReadOnlyFileStore in project jackrabbit-oak by apache.
the class SegmentBufferWriterTest method dirtyBuffersShouldBeFlushed.
@Test
public void dirtyBuffersShouldBeFlushed() throws Exception {
List<SegmentId> before;
try (FileStore store = openFileStore()) {
// init
}
try (ReadOnlyFileStore store = openReadOnlyFileStore()) {
before = newArrayList(store.getSegmentIds());
}
try (FileStore store = openFileStore()) {
SegmentWriter writer = segmentWriterBuilder("t").build(store);
writer.writeString("test");
writer.flush();
}
List<SegmentId> after;
try (ReadOnlyFileStore store = openReadOnlyFileStore()) {
after = newArrayList(store.getSegmentIds());
}
assertNotEquals(before, after);
}
Aggregations