Skip to content

wip,draft: Add async support to persist_test_utils#343

Draft
ValuedMammal wants to merge 3 commits intobitcoindevkit:masterfrom
ValuedMammal:feat/persist_test_utils_async
Draft

wip,draft: Add async support to persist_test_utils#343
ValuedMammal wants to merge 3 commits intobitcoindevkit:masterfrom
ValuedMammal:feat/persist_test_utils_async

Conversation

@ValuedMammal
Copy link
Collaborator

Description

Expands persist_test_utils module by adding a function persist_wallet_changeset_async to be used for testing an AsyncWalletPersister implementation. For now this is still WIP.

Notes to the reviewers

Changelog notice

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 44.86692% with 145 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.43%. Comparing base (35502e0) to head (bf0057f).

Files with missing lines Patch % Lines
src/persist_test_utils.rs 44.86% 145 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
- Coverage   86.46%   85.43%   -1.04%     
==========================================
  Files          25       25              
  Lines        8527     8649     +122     
==========================================
+ Hits         7373     7389      +16     
- Misses       1154     1260     +106     
Flag Coverage Δ
rust 85.43% <44.86%> (-1.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch from 15149b5 to bf0057f Compare February 7, 2026 05:49
Comment on lines +146 to +151
pub fn persist_multiple_wallet_changesets<F, P>(create_stores: F) -> Result<(), PersistError>
where
F: Fn() -> Result<(P, P), P::Error>,
P: WalletPersister,
P::Error: StdErr + 'static,
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@110CodingP I changed this by removing the &Path arg from the create_stores Fn, which means this function is no longer in control of the path in which the stores are created. After thinking about it I'm not sure this is a feature that needs to be tested. Any thought about whether to keep or improve it somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant

Comments