Skip to content

Implement range reads tests #1601

@jasagredo

Description

@jasagredo

I think we may want to have our own tests for this backend. Even though lsm-tree has a comprehensive test suite, I feel like the code in this file is involved enough to at least have some lightweight testing.

For example, the range read seems not to be covered by the LedgerDB-level test suite. I ran the tests with coverage as follows:

cabal test storage-test --enable-coverage --test-options "-p LSM"
...
Test suite storage-test: RUNNING...
ouroboros-storage
  Storage
    LedgerDB
      StateMachine
        LSM: OK (7.35s)
          +++ OK, passed 1000 tests.
...

And the coverage report (see attached, specifically the Ouroboros.Consensus.Storage.LedgerDB.V2.LSM module) seems to indicate that the range read was never executed (hpc highlights such code in yellow):
lsm-coverage

that agrees with the LedgerDB-level model actions.

hpc_index.html.txt

Originally posted by @geo2a in #1572 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions