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!

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
open fun setUp()
Link copied to clipboard
fun tearDown()
Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun testDoubleClose()
Link copied to clipboard
open fun testEmpty()
Link copied to clipboard
open fun testFileNotFound()
Link copied to clipboard
open fun testLargeCFS()
Link copied to clipboard
open fun testListAll()
Link copied to clipboard
Link copied to clipboard
open fun testManySubFiles()
Link copied to clipboard
open override fun testMergeStability()

The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs.

Link copied to clipboard

Calls close multiple times on closeable codec apis

Link copied to clipboard
Link copied to clipboard
open fun testRandomAccess()

This test opens two files from a compound stream and verifies that their file positions are independent of each other.

Link copied to clipboard

This test opens two files from a compound stream and verifies that their file positions are independent of each other.

Link copied to clipboard

Tests exception handling on write and openInput/createOutput

Link copied to clipboard
open fun testRandomFiles()

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.

Link copied to clipboard
open fun testReadPastEOF()
Link copied to clipboard
Link copied to clipboard
open fun testSingleFile()

This test creates compound file based on a single file. Files of different sizes are tested: 0, 1, 10, 100 bytes.

Link copied to clipboard
open fun testSyncDisabled()
Link copied to clipboard
open fun testTwoFiles()

This test creates compound file based on two files.