diff --git a/tests/integration_tests/event_property_parser.rs b/tests/integration_tests/event_property_parser.rs index 240e18d..ef22b77 100644 --- a/tests/integration_tests/event_property_parser.rs +++ b/tests/integration_tests/event_property_parser.rs @@ -42,7 +42,7 @@ async fn test_highlevel_event_pause() -> Result<(), MpvError> { async fn test_highlevel_event_volume() -> Result<(), MpvError> { let (proc, mpv) = spawn_headless_mpv().await?; - mpv.observe_property(1337, "volume").await?; + mpv.observe_property(MPV_CHANNEL_ID, "volume").await?; let (handle, cancellation_token) = create_interruptable_event_property_checking_thread( mpv.clone(), |property| match property { @@ -73,7 +73,7 @@ async fn test_highlevel_event_volume() -> Result<(), MpvError> { async fn test_highlevel_event_mute() -> Result<(), MpvError> { let (proc, mpv) = spawn_headless_mpv().await?; - mpv.observe_property(1337, "mute").await?; + mpv.observe_property(MPV_CHANNEL_ID, "mute").await?; let (handle, cancellation_token) = create_interruptable_event_property_checking_thread( mpv.clone(), |property| match property { @@ -102,7 +102,7 @@ async fn test_highlevel_event_mute() -> Result<(), MpvError> { async fn test_highlevel_event_duration() -> Result<(), MpvError> { let (proc, mpv) = spawn_headless_mpv().await?; - mpv.observe_property(1337, "duration").await?; + mpv.observe_property(MPV_CHANNEL_ID, "duration").await?; let (handle, cancellation_token) = create_interruptable_event_property_checking_thread( mpv.clone(), diff --git a/tests/integration_tests/util.rs b/tests/integration_tests/util.rs index be7145c..93bed91 100644 --- a/tests/integration_tests/util.rs +++ b/tests/integration_tests/util.rs @@ -45,6 +45,7 @@ pub async fn spawn_headless_mpv() -> Result<(Child, Mpv), MpvError> { Ok((process_handle, mpv)) } +/// The channel ID used for property observation in tests pub const MPV_CHANNEL_ID: u64 = 1337; #[derive(Error, Debug)]