BaseCompoundFormatTestCase
Abstract class to do basic tests for a compound format. NOTE: This test focuses on the compound impl, nothing else. The stretch goal is for this test to be so thorough in testing a new CompoundFormat that if this test passes, then all Lucene tests should also pass. Ie, if there is some bug in a given CompoundFormat that this test fails to catch then this test needs to be improved!
Functions
This test is the best effort at verifying that checkIntegrity doesn't miss any files. It tests that the combination of opening a reader and calling checkIntegrity on it reads all bytes of all files.
The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs.
Calls close multiple times on closeable codec apis
This test opens two files from a compound stream and verifies that their file positions are independent of each other.
This test opens two files from a compound stream and verifies that their file positions are independent of each other.
Tests exception handling on write and openInput/createOutput
This test creates a compound file based on a large number of files of various length. The file content is generated randomly. The sizes range from 0 to 1Mb. Some of the sizes are selected to test the buffering logic in the file reading code. For this the chunk variable is set to the length of the buffer used internally by the compound file logic.
This test creates compound file based on a single file. Files of different sizes are tested: 0, 1, 10, 100 bytes.
This test creates compound file based on two files.