Skip to content

feat(storage): Add unit tests for pebble implementation of DB interface.#4515

Merged
alesforz merged 14 commits intofeature/remove-cometbftdbfrom
alesforz/test-pebble
Nov 21, 2024
Merged

feat(storage): Add unit tests for pebble implementation of DB interface.#4515
alesforz merged 14 commits intofeature/remove-cometbftdbfrom
alesforz/test-pebble

Conversation

@alesforz
Copy link
Collaborator

@alesforz alesforz commented Nov 19, 2024

Partially addresses #4486.

Context

CometBFT will stop importing cometbft-db as a dependency to support multiple database backends. Instead, it will use pebble by default.

Changes

This PR adds unit tests to the pebble implementation of the DB interface that CometBFT will use once we remove cometbft-db.


PR checklist

  • Tests written/updated
  • [ ] Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

Alessandro added 2 commits November 19, 2024 18:08
Rewrote unit test for the set operation to test the behavior of `setWithOpts`.
This should be sufficient to test the Set and SetSync methods, because under the
hood they only differ in that they call setWithOpts with pebble.NoSync and
pebble.Sync respectively.
@alesforz alesforz self-assigned this Nov 19, 2024
@alesforz alesforz added storage P:tech-debt Priority: Technical debt that needs to be paid off to enable us to move faster, reliably testing related to unit testing in general labels Nov 19, 2024
@alesforz alesforz mentioned this pull request Nov 19, 2024
9 tasks
@alesforz alesforz changed the title feat(storage): Add unit tests for pebble functionalities. feat(storage): Add unit tests for pebble implementation of DB interface. Nov 20, 2024
@alesforz alesforz marked this pull request as ready for review November 20, 2024 14:40
@alesforz alesforz requested a review from a team as a code owner November 20, 2024 14:40
@alesforz alesforz requested a review from a team November 20, 2024 14:40
Copy link
Collaborator

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alesforz alesforz merged commit b8e610a into feature/remove-cometbftdb Nov 21, 2024
@alesforz alesforz deleted the alesforz/test-pebble branch November 21, 2024 12:53
@jmalicevic jmalicevic added this to the 2024-Q4 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P:tech-debt Priority: Technical debt that needs to be paid off to enable us to move faster, reliably storage testing related to unit testing in general

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants