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

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.polaris.persistence.nosql.api.backend.Backend
     
    protected org.apache.polaris.ids.api.MonotonicClock
     
    protected org.apache.polaris.ids.api.IdGenerator
     
    protected org.apache.polaris.persistence.nosql.api.Persistence
     
    protected org.assertj.core.api.SoftAssertions
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    commitLogOffsets(int offsetIndex, org.junit.jupiter.api.TestInfo testInfo)
     
    void
    commitLogs(int numCommits, org.junit.jupiter.api.TestInfo testInfo)
     
    void
    commitLogShortTail(int referencePreviousHeadCount, org.junit.jupiter.api.TestInfo testInfo)
    When a commit's tail is shorter than the number of commits fetched per page, the "natural" commit log must not stop early.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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's tail is shorter than the number of commits fetched per page, the "natural" commit log must not stop early. This exercises referencePreviousHeadCount values below the internal reverse-fetch page size, so pages contain fewer entries than the page size. That previously caused commitLog to truncate the history at the first commit of a short tail.
      Throws:
      Exception