Skip to content

feat!: Add async support to persist_test_utils#343

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

feat!: 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
Copy Markdown
Collaborator

@ValuedMammal ValuedMammal commented Nov 7, 2025

Description

Expands the persist_test_utils module by adding a function persist_wallet_changeset_async to be used for testing an AsyncWalletPersister implementation.

Changelog notice

Added

  • persist_wallet_changeset_async to persistence test suite for testing an AsyncWalletPersister.

Changed

  • deps: Removed optional dependencies anyhow, tempfile

Checklists

All Submissions:

New Features:

  • I've added docs for the new feature

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.21%. Comparing base (fbf803a) to head (0547ea1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #343   +/-   ##
=======================================
  Coverage   80.21%   80.21%           
=======================================
  Files          24       24           
  Lines        5347     5347           
  Branches      242      242           
=======================================
  Hits         4289     4289           
  Misses        980      980           
  Partials       78       78           
Flag Coverage Δ
rust 80.21% <ø> (ø)

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 2 times, most recently from 15149b5 to bf0057f Compare February 7, 2026 05:49
Comment thread src/persist_test_utils.rs
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch 2 times, most recently from 7e53c18 to 8be4c86 Compare February 26, 2026 04:36
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch from 8be4c86 to 2c011f1 Compare March 18, 2026 02:31
@ValuedMammal ValuedMammal changed the title wip,draft: Add async support to persist_test_utils Add async support to persist_test_utils Mar 18, 2026
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch from 2c011f1 to 9c62a96 Compare March 18, 2026 03:01
@ValuedMammal ValuedMammal changed the title Add async support to persist_test_utils feat!: Add async support to persist_test_utils Mar 18, 2026
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch 2 times, most recently from 940e7c1 to 8059762 Compare March 30, 2026 17:16
@ValuedMammal ValuedMammal marked this pull request as ready for review March 30, 2026 17:17
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch from 8059762 to 12e1fcd Compare March 30, 2026 17:26
@ValuedMammal ValuedMammal added this to the Wallet 4.0.0 milestone Mar 30, 2026
@ValuedMammal ValuedMammal self-assigned this Mar 30, 2026
@ValuedMammal ValuedMammal added api A breaking API change tests New or improved tests labels Mar 30, 2026
@ValuedMammal ValuedMammal moved this to In Progress in BDK Wallet Mar 30, 2026
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch from 12e1fcd to 2d46064 Compare April 13, 2026 13:42
Changed the definition of `persist_*` functions to take a
`create_store` Fn (and no path) as the caller may want more
control of the path to the database file.

- deps: Make `tempfile`, `anyhow` dev-dependencies again
Comment thread tests/persisted_wallet.rs Outdated
@ValuedMammal ValuedMammal force-pushed the feat/persist_test_utils_async branch from 2d46064 to 0547ea1 Compare April 16, 2026 18:58
@KrishnaShuk
Copy link
Copy Markdown

Concept ACK

The sync side has 5 test utilities but only persist_wallet_changeset got an async equivalent.
persist_network, persist_keychains, persist_single_keychain, and persist_multiple_wallet_changesets are missing async versions.
A backend could pass the full changeset round-trip but fail on partial writes. Is this intentional or planned for follow-up?

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

Labels

api A breaking API change tests New or improved tests

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants