use of org.apache.lucene.store.RAMFile in project lucene-solr by apache.
the class TestCodecUtil method testWriteTooLongHeader.
public void testWriteTooLongHeader() throws Exception {
StringBuilder tooLong = new StringBuilder();
for (int i = 0; i < 128; i++) {
tooLong.append('a');
}
RAMFile file = new RAMFile();
IndexOutput output = new RAMOutputStream(file, true);
expectThrows(IllegalArgumentException.class, () -> {
CodecUtil.writeHeader(output, tooLong.toString(), 5);
});
}
Aggregations