Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic: improve unit test coverage in pageserver #3667

Closed
1 of 12 tasks
LizardWizzard opened this issue Feb 21, 2023 · 0 comments
Closed
1 of 12 tasks

Epic: improve unit test coverage in pageserver #3667

LizardWizzard opened this issue Feb 21, 2023 · 0 comments
Labels
a/tech_debt Area: related to tech debt c/storage/pageserver Component: storage: pageserver c/storage Component: storage t/Epic Issue type: Epic
Milestone

Comments

@LizardWizzard
Copy link
Contributor

LizardWizzard commented Feb 21, 2023

Motivation

Mainly we have integration tests written in python. These tests are suitable for complex scenarios that involve many components, but fall short when you need to test on a module basis. Currently we dont have much unit tests. Adding new ones is quite hard for scenarios that involve playing with actual data (for example actual storage implementation).

Unit tests have a shorter feedback loop and can be run significantly faster than integration tests that involve many processes. They also facilitate better onboarding experience for new engineers since its way easier to understand whats going on in unit test compared to integration tests where a failure can be caused by any component and we have a lot of moving parts there.

There are some smoke tests for storage in https://github.com/neondatabase/neon/blob/main/pageserver/src/tenant.rs#L2913 but this is not enough. This doesnt excersize gc and compaction paths.

Other aspects like tenant relocation are only covered in integration tests. Tests for eviction and ondemand download require

DoD

All major components have their test suite that is found sufficient. Is it ok to measure by code coverage? Its not ideal, but can be helpful. See list of components and modules in task list.

Implementation ideas

Take areas one by one, analyze ideas for testing, apply needed refactorings for ease of testing, write tests.

For some cases tools like proptest can be useful.

Tasks

  1. a/tech_debt c/storage c/storage/pageserver
  2. c/storage c/storage/pageserver

List to be continued, feel free to add areas that you feel are not tested enough

Other related tasks and Epics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/storage/pageserver Component: storage: pageserver c/storage Component: storage t/Epic Issue type: Epic
Projects
None yet
Development

No branches or pull requests

2 participants