Repository navigation
test: fold the remaining AppState and PipelineManager copies into common - #1083
Merged
Merged
Conversation
#935 moved the hand-built test setup into common::state and common::manager. Five copies landed on main around it: the stinger harness, stinger_bench, media_player_hls_test, vision_mixer_input_format and one test in enum_property_read_test. They now use the shared helpers. common::state::with_media is new, for the stinger tests that keep media in their own dir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 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.
Refs #935
Problem
#935 moved the hand-built
AppState::newandPipelineManager::newsetup in the integration tests intocommon::stateandcommon::manager. Five copies landed on main around it and stayed hand-built: the stinger harness (common/stinger.rs),stinger_bench,media_player_hls_test,vision_mixer_input_format/mod.rs, andreading_a_missing_pad_does_not_create_itinenum_property_read_test(from #922, which spelled out its setup on purpose so that it would not depend on #935's helpers while both PRs were open).Change
common::state::with_media(media)is new: aTestStatewith its media under a given dir.new()now calls it with the system temp dir. The stinger tests keep clips in their ownTempDirand use this helper.Runningholds aTestStateinstead of anAppStateplus twoNamedTempFiles. The HTTP tests instinger_api_testtaker.state.app()forcreate_app_with_state, asTestState's docs say.media_player_hls_testdrops itsnew_app_state()and usescommon::state::new().vision_mixer_input_formatusescommon::manager::build, and itsRunningno longer keeps a registry temp file alive. test: share AppState and PipelineManager setup across integration tests #935's review confirmed that the registry is read only during construction.enum_property_read_testuses the file's ownbuild_manager().After this,
git grep "PipelineManager::new(\|AppState::new(" -- backend/testsfinds only the two helpers andport_pool_test. #935 leftport_pool_testalone on purpose, because it keeps storage and media in oneTempDir.Behaviour change: the old copies left their
NamedTempFiles behind (storage recreated them on write).TestStateremoves its dir on drop, as in #935.Evidence
This is a refactor of test setup. The tests pass before and after, so they guard the rewrite, not a new claim.
Tests
Ran on macOS, on a branch made from main at
68ae797f, withSTROM_REQUIRE_GST_PLUGINS=1:cargo test --test enum_property_read_test --test media_player_hls_test --test stinger_api_test --test stinger_test --test stinger_prores_test --test stinger_software_decode_test --test vision_mixer_input_format_test --test block_properties_persist_test --test stinger_bench: 49 passed, 0 failed, 1 ignored (stinger_bench, which is already#[ignore]).cargo clippy --all-targets -- -D warnings: clean (default features).Not run: the full suite,
vision_mixer_input_format_cuda_test(no CUDA here; it compiles), Linux, Windows.For the reviewer
#936 adds
common::blockandcommon::busand does not touch these files. Whichever lands second may need a textual rebase.🤖 Generated with Claude Code