Skip to content

Database/Registry integration test#781

Open
kurtisc wants to merge 1 commit intomainfrom
kurtis/durable-storage/integrate-database
Open

Database/Registry integration test#781
kurtisc wants to merge 1 commit intomainfrom
kurtis/durable-storage/integrate-database

Conversation

@kurtisc
Copy link
Contributor

@kurtisc kurtisc commented Feb 3, 2026

Closes RV-859

What

Integration test for Durable Storage

Why

We want to:

  1. Expose the public parts of the Database and Registry APIs
  2. Check that everything works as expected

How

  • Move TestableTmpDir to a new utils module so that external crates (e.g. the integration test, the benchmarks) can use it.
  • Add a new integration test

Manually Testing

make all

In the root directory::

cargo test

or in durable-storage/tests/integration/

cargo test

But not in durable-storage/!

Tasks for the Author

  • Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes).
  • Eliminate dead code and other spurious artefacts introduced in your changes.
  • Document new public functions, methods and types.
  • Make sure the documentation for updated functions, methods, and types is correct.
  • Add tests for bugs that have been fixed.
  • Explain changes to regression test captures when applicable.
  • Write commit messages in agreement with our guidelines.
  • Self-review your changes to ensure they are high-quality.
  • Complete all of the above before assigning this MR to reviewers.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (kurtis/durable-storage/testable-tmp-dir-util-merge@22feb1f). Learn more about missing BASE report.

Additional details and impacted files
@@                                  Coverage Diff                                  @@
##             kurtis/durable-storage/testable-tmp-dir-util-merge     #781   +/-   ##
=====================================================================================
  Coverage                                                      ?   91.06%           
=====================================================================================
  Files                                                         ?      110           
  Lines                                                         ?    20831           
  Branches                                                      ?    20831           
=====================================================================================
  Hits                                                          ?    18969           
  Misses                                                        ?     1489           
  Partials                                                      ?      373           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch 7 times, most recently from 763af63 to 8442c5a Compare February 5, 2026 15:01
@kurtisc kurtisc marked this pull request as ready for review February 5, 2026 15:03
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Benchmark results for revision b3189af:

Metric Duration TPS
Mean 1.517304362s 26.363
Worst 1.525648177s 26.218
Best 1.509170389s 26.505
Standard Deviation ±4.72137ms ±0.082
Full results
Run Transfers Duration TPS
1 40 1.524598427s 26.236
2 40 1.516323701s 26.380
3 40 1.520148428s 26.313
4 40 1.525648177s 26.218
5 40 1.518133021s 26.348
6 40 1.509170389s 26.505
7 40 1.523289016s 26.259
8 40 1.51426328s 26.415
9 40 1.524550514s 26.237
10 40 1.513452249s 26.430
11 40 1.511163451s 26.470
12 40 1.518338743s 26.345
13 40 1.515528116s 26.393
14 40 1.511679416s 26.461
15 40 1.511000607s 26.473
16 40 1.516275279s 26.380
17 40 1.520133394s 26.313
18 40 1.520277795s 26.311
19 40 1.515629399s 26.392
20 40 1.516483832s 26.377

Compare the results above with those for the default branch.

@kurtisc kurtisc mentioned this pull request Feb 5, 2026
9 tasks
@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch 2 times, most recently from 62eccad to 1b08c86 Compare February 6, 2026 18:16
@kurtisc kurtisc requested a review from NSant215 February 6, 2026 18:19
test_durable_storage_inner(operations)
}

const VALUE_MAX_SIZE: usize = 4096;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems low given the database supports much larger values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is also to try to balance performance of the test but I will look into something that tests some large values.

/// proptest's shrinking algorithm can find a minimal-failing test with fewer iterations.
#[test]
fn test_durable_storage_prop((keys, values, ops) in operations_strategy(1usize..100)) {
// Auto formatting doesn't work within the proptest macro
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Auto formatting doesn't work within the proptest macro

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intentional, to explain why I'm using a standalone function outside of the proptest macro.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I'd maybe add that to the comment then, otherwise it looked to me like just stating a fact so I didn't understand why it was there. Feel free to resolve either way.

@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch 5 times, most recently from 8af8bc0 to 80c7318 Compare February 9, 2026 11:26
@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch from 80c7318 to 0f77146 Compare February 9, 2026 14:37
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the reason for making the integration tests a separate crate? What prevents them from existing as integration tests in the octez-riscv-durable-storage crate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I didn't know that was a thing. Thanks, done.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this be suitable for the octez-riscv-test-utils crate in /test-utils?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make this a standalone PR now

@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch 5 times, most recently from 2908264 to 6ff9ccd Compare February 10, 2026 09:33
@kurtisc kurtisc changed the base branch from main to kurtis/durable-storage/testable-tmp-dir-util February 10, 2026 09:36
@kurtisc kurtisc mentioned this pull request Feb 10, 2026
9 tasks
@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch from 6ff9ccd to f27d362 Compare February 10, 2026 09:42
@kurtisc kurtisc changed the base branch from kurtis/durable-storage/testable-tmp-dir-util to kurtis/durable-storage/testable-tmp-dir-util-merge February 10, 2026 09:43
@kurtisc
Copy link
Contributor Author

kurtisc commented Feb 10, 2026

Draft until parent branches are merged #803 #804

@kurtisc kurtisc marked this pull request as draft February 10, 2026 09:44
@kurtisc kurtisc force-pushed the kurtis/durable-storage/testable-tmp-dir-util-merge branch from 0232561 to e87d575 Compare February 10, 2026 09:48
@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch from f27d362 to 21d2b57 Compare February 10, 2026 09:48
@kurtisc kurtisc force-pushed the kurtis/durable-storage/testable-tmp-dir-util-merge branch from e87d575 to 22feb1f Compare February 10, 2026 09:49
@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch from 21d2b57 to 38cc95d Compare February 10, 2026 09:49
Adds an integration test for all of the operations of `Registry` and
`Database`.
@kurtisc kurtisc force-pushed the kurtis/durable-storage/integrate-database branch from 38cc95d to 81f2b89 Compare February 10, 2026 13:15
@kurtisc kurtisc changed the base branch from kurtis/durable-storage/testable-tmp-dir-util-merge to main February 10, 2026 13:15
@kurtisc kurtisc marked this pull request as ready for review February 10, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants