Skip to content

test: fold the remaining AppState and PipelineManager copies into common - #1083

Merged
srperens merged 1 commit into
mainfrom
test/fold-remaining-test-setup
Oct 19, 2026
Merged

srperens merged 1 commit into
mainfrom
test/fold-remaining-test-setup

Conversation

@srperens

Copy link
Copy Markdown
Collaborator

Refs #935

Problem

#935 moved the hand-built AppState::new and PipelineManager::new setup in the integration tests into common::state and common::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, and reading_a_missing_pad_does_not_create_it in enum_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: a TestState with its media under a given dir. new() now calls it with the system temp dir. The stinger tests keep clips in their own TempDir and use this helper.
  • The stinger Running holds a TestState instead of an AppState plus two NamedTempFiles. The HTTP tests in stinger_api_test take r.state.app() for create_app_with_state, as TestState's docs say.
  • media_player_hls_test drops its new_app_state() and uses common::state::new().
  • vision_mixer_input_format uses common::manager::build, and its Running no 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_test uses the file's own build_manager().

After this, git grep "PipelineManager::new(\|AppState::new(" -- backend/tests finds only the two helpers and port_pool_test. #935 left port_pool_test alone on purpose, because it keeps storage and media in one TempDir.

Behaviour change: the old copies left their NamedTempFiles behind (storage recreated them on write). TestState removes 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, with STROM_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::block and common::bus and does not touch these files. Whichever lands second may need a textual rebase.

🤖 Generated with Claude Code

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

1 participant