Class BaseTestCommitLogImpl
java.lang.Object
org.apache.polaris.persistence.nosql.impl.commits.BaseTestCommitLogImpl
@ExtendWith({org.apache.polaris.persistence.nosql.testextension.PersistenceTestExtension.class,org.assertj.core.api.junit.jupiter.SoftAssertionsExtension.class})
public abstract class BaseTestCommitLogImpl
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.polaris.persistence.nosql.api.backend.Backendprotected org.apache.polaris.ids.api.MonotonicClockprotected org.apache.polaris.ids.api.IdGeneratorprotected org.apache.polaris.persistence.nosql.api.Persistenceprotected org.assertj.core.api.SoftAssertions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcommitLogOffsets(int offsetIndex, org.junit.jupiter.api.TestInfo testInfo) voidcommitLogs(int numCommits, org.junit.jupiter.api.TestInfo testInfo) voidcommitLogShortTail(int referencePreviousHeadCount, org.junit.jupiter.api.TestInfo testInfo) When a commit'stailis shorter than the number of commits fetched per page, the "natural" commit log must not stop early.
-
Field Details
-
soft
protected org.assertj.core.api.SoftAssertions soft -
persistence
protected org.apache.polaris.persistence.nosql.api.Persistence persistence -
backend
protected org.apache.polaris.persistence.nosql.api.backend.Backend backend -
clock
protected org.apache.polaris.ids.api.MonotonicClock clock -
idGenerator
protected org.apache.polaris.ids.api.IdGenerator idGenerator
-
-
Constructor Details
-
BaseTestCommitLogImpl
public BaseTestCommitLogImpl()
-
-
Method Details
-
commitLogs
@ParameterizedTest @ValueSource(ints={0,1,3,19,20,21,39,40,41,255}) public void commitLogs(int numCommits, org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
commitLogOffsets
@ParameterizedTest @ValueSource(ints={1,3,21,41}) public void commitLogOffsets(int offsetIndex, org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
commitLogShortTail
@ParameterizedTest @ValueSource(ints={2,3,5}) public void commitLogShortTail(int referencePreviousHeadCount, org.junit.jupiter.api.TestInfo testInfo) throws Exception When a commit'stailis shorter than the number of commits fetched per page, the "natural" commit log must not stop early. This exercisesreferencePreviousHeadCountvalues below the internal reverse-fetch page size, so pages contain fewer entries than the page size. That previously causedcommitLogto truncate the history at the first commit of a short tail.- Throws:
Exception
-