Repository navigation
test: adopt rstest for parameterized tests - #75
Merged
Merged
Conversation
test_regular_abort_for_db_only_matching_db_key and test_regular_abort_for_db_does_not_match_colon_prefix_alias ended by calling abort_for_db for the other database. abort_for_db returns Ok(()) when nothing matches, so neither test checked that the other transaction was still tracked. Both tests now keep each task's AbortHandle. They assert that the matching task finished and the other did not, then that aborting the other database finishes it. Making abort_for_db match every transaction, or match by prefix, now fails them.
remdalm
marked this pull request as draft
October 24, 2026 09:48
remdalm
marked this pull request as ready for review
October 24, 2026 10:04
jjhafer
reviewed
Oct 24, 2026
remdalm
force-pushed
the
feat/rstest
branch
2 times, most recently
from
October 24, 2026 16:37
f12c6d8 to
327df29
Compare
velocitysystems
requested changes
Oct 25, 2026
A test that loops over inputs, or puts one assert per input in one function, stops at the first failing input, and cargo test cannot run one input on its own. rstest generates one test per #[case], so a run reports every failing input and each one can be run by name. The scope follows tauri-plugin-connectivity's adoption of rstest (c5d624d), with a stricter rule for merging separate tests: - Every test that checked several inputs in one function is now a table with one named case per input. - Separate tests are merged only when each case is another example of the same guarantee. A comment saying why an input is interesting is fine. A case that needs different assertions, a branch, or a comment arguing a different guarantee stays its own test. - Scenario tests stay plain: setup loops, ordered or stateful steps, races, polling, and tests that differ in which operation they run. Every input keeps its value. The storage-class round trip now reads each value through quote(), which pins the value and its storage class in one string and replaces the separate typeof probe. Some rejections now assert the exact error variant or code instead of is_err(). test_reserved_schema_names_rejected loses its closing check that nothing stayed attached: every rejection happens in validation, before any ATTACH, so that check could not fail. The workspace goes from 358 test functions to 416 generated tests, 173 of them cases in 42 tables. CHANGELOG.md names the readable-notification test by its new name. rstest 0.28.0 is a dev-dependency of all four crates with default features off. Its crate-name feature changes feature resolution for toml crates that tauri's build shares, so a warm workspace build would rebuild tauri. Cargo.lock adds rstest, rstest_macros and relative-path. It also moves some Windows-only edges from windows-sys 0.60 to 0.61, which adding any new package does here. Nothing else in the normal dependency graph changes.
velocitysystems
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.