mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-26 17:46:19 +00:00
hlsmultivariantsink: Serialise tests and increase channel timeout
Serialise the tests and increase the recv_timeout as it may not be enough on the CI to do H264/H265 encoding for 1080p streams which are we using for testing. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2083>
This commit is contained in:
parent
6165b3fe08
commit
d2aceab54b
3 changed files with 15 additions and 6 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2763,6 +2763,7 @@ dependencies = [
|
||||||
"gstreamer-pbutils",
|
"gstreamer-pbutils",
|
||||||
"gstreamer-video",
|
"gstreamer-video",
|
||||||
"m3u8-rs",
|
"m3u8-rs",
|
||||||
|
"serial_test",
|
||||||
"thiserror 2.0.11",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ m3u8-rs = "5.0"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
gst-plugin-hlssink3 = { path = "../hlssink3" }
|
gst-plugin-hlssink3 = { path = "../hlssink3" }
|
||||||
gst-plugin-fmp4 = { path = "../../mux/fmp4" }
|
gst-plugin-fmp4 = { path = "../../mux/fmp4" }
|
||||||
|
serial_test = "3"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gst-plugin-version-helper.workspace = true
|
gst-plugin-version-helper.workspace = true
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
use gio::prelude::*;
|
use gio::prelude::*;
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
use gsthlsmultivariantsink::{HlsMultivariantSinkMuxerType, HlsMultivariantSinkPlaylistType};
|
use gsthlsmultivariantsink::{HlsMultivariantSinkMuxerType, HlsMultivariantSinkPlaylistType};
|
||||||
|
use serial_test::serial;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::mpsc::SyncSender;
|
use std::sync::mpsc::SyncSender;
|
||||||
|
@ -323,6 +324,7 @@ fn setup_signals(
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant() -> Result<(), ()> {
|
fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant() -> Result<(), ()> {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
@ -456,7 +458,7 @@ fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant() -> Resu
|
||||||
assert!(eos);
|
assert!(eos);
|
||||||
|
|
||||||
let mut actual_events = Vec::new();
|
let mut actual_events = Vec::new();
|
||||||
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_millis(1)) {
|
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_secs(30)) {
|
||||||
actual_events.push(event);
|
actual_events.push(event);
|
||||||
}
|
}
|
||||||
let expected_events = {
|
let expected_events = {
|
||||||
|
@ -509,6 +511,7 @@ low/video.m3u8
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn hlsmultivariantsink_multiple_audio_rendition_single_video_variant() -> Result<(), ()> {
|
fn hlsmultivariantsink_multiple_audio_rendition_single_video_variant() -> Result<(), ()> {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
@ -618,7 +621,7 @@ fn hlsmultivariantsink_multiple_audio_rendition_single_video_variant() -> Result
|
||||||
assert!(eos);
|
assert!(eos);
|
||||||
|
|
||||||
let mut actual_events = Vec::new();
|
let mut actual_events = Vec::new();
|
||||||
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_millis(1)) {
|
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_secs(30)) {
|
||||||
actual_events.push(event);
|
actual_events.push(event);
|
||||||
}
|
}
|
||||||
let expected_events = {
|
let expected_events = {
|
||||||
|
@ -659,6 +662,7 @@ hi/video.m3u8
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn hlsmultivariantsink_single_audio_rendition_multiple_video_variant() -> Result<(), ()> {
|
fn hlsmultivariantsink_single_audio_rendition_multiple_video_variant() -> Result<(), ()> {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
@ -776,7 +780,7 @@ fn hlsmultivariantsink_single_audio_rendition_multiple_video_variant() -> Result
|
||||||
assert!(eos);
|
assert!(eos);
|
||||||
|
|
||||||
let mut actual_events = Vec::new();
|
let mut actual_events = Vec::new();
|
||||||
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_millis(1)) {
|
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_secs(30)) {
|
||||||
actual_events.push(event);
|
actual_events.push(event);
|
||||||
}
|
}
|
||||||
let expected_events = {
|
let expected_events = {
|
||||||
|
@ -824,6 +828,7 @@ low/video.m3u8
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant_with_mpegts(
|
fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant_with_mpegts(
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
init();
|
init();
|
||||||
|
@ -953,7 +958,7 @@ fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant_with_mpeg
|
||||||
assert!(eos);
|
assert!(eos);
|
||||||
|
|
||||||
let mut actual_events = Vec::new();
|
let mut actual_events = Vec::new();
|
||||||
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_millis(1)) {
|
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_secs(30)) {
|
||||||
actual_events.push(event);
|
actual_events.push(event);
|
||||||
}
|
}
|
||||||
let expected_events = {
|
let expected_events = {
|
||||||
|
@ -999,6 +1004,7 @@ low/video.m3u8
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn hlsmultivariantsink_multiple_video_variant_with_mpegts_audio_video_muxed() -> Result<(), ()> {
|
fn hlsmultivariantsink_multiple_video_variant_with_mpegts_audio_video_muxed() -> Result<(), ()> {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
@ -1125,7 +1131,7 @@ fn hlsmultivariantsink_multiple_video_variant_with_mpegts_audio_video_muxed() ->
|
||||||
assert!(eos);
|
assert!(eos);
|
||||||
|
|
||||||
let mut actual_events = Vec::new();
|
let mut actual_events = Vec::new();
|
||||||
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_millis(1)) {
|
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_secs(30)) {
|
||||||
actual_events.push(event);
|
actual_events.push(event);
|
||||||
}
|
}
|
||||||
let expected_events = {
|
let expected_events = {
|
||||||
|
@ -1164,6 +1170,7 @@ low-audio/audio-only.m3u8
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant_with_mpegts_h265(
|
fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant_with_mpegts_h265(
|
||||||
) -> Result<(), ()> {
|
) -> Result<(), ()> {
|
||||||
init();
|
init();
|
||||||
|
@ -1301,7 +1308,7 @@ fn hlsmultivariantsink_multiple_audio_rendition_multiple_video_variant_with_mpeg
|
||||||
assert!(eos);
|
assert!(eos);
|
||||||
|
|
||||||
let mut actual_events = Vec::new();
|
let mut actual_events = Vec::new();
|
||||||
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_millis(1)) {
|
while let Ok(event) = hls_events_receiver.recv_timeout(Duration::from_secs(30)) {
|
||||||
actual_events.push(event);
|
actual_events.push(event);
|
||||||
}
|
}
|
||||||
let expected_events = {
|
let expected_events = {
|
||||||
|
|
Loading…
Reference in a new issue