-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration test for ungraceful stop of camera recorder pipeline #150
base: master
Are you sure you want to change the base?
Conversation
// TODO: close pravega writers | ||
//drop(writer.get_mut().get_mut().get_mut()); | ||
//drop(index_writer); | ||
gst::element_error!(element, gst::CoreError::Failed, ["Simulate pravegasink failure"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see "Simulate pravegasink failure" in the test log. How can I confirm that this is actually simulating a failure?
Also, by not closing the writer, this is effectively performing a graceful stop as you can tell from these log messages:
0:00:35.579572114 50606 0x558c7e3ab860 INFO pravegasink gst-plugin-pravega/src/pravegasink/imp.rs:1167:gstpravega::pravegasink::imp:<pravegasink0> stop: BEGIN
0:00:35.581769200 50606 0x558c7e3ab860 INFO pravegasink gst-plugin-pravega/src/pravegasink/imp.rs:1221:gstpravega::pravegasink::imp:<pravegasink0> stop: Wrote final index record IndexRecord { timestamp: 2022-01-04T18:12:48.404852888Z (1641320005404852888 ns, 455922:13:25.404852888), offset: 163880, random_access: false, discontinuity: false }
0:00:35.583745207 50606 0x558c7e3ab860 INFO pravegasink gst-plugin-pravega/src/pravegasink/imp.rs:1250:gstpravega::pravegasink::imp:<pravegasink0> stop: END: result=Ok(())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log "Simulate pravegasink failure" in info.
|
||
#[rstest] | ||
#[case(Realtime, 30, 15)] | ||
fn test_ungraceful_stop(#[case] clock_type: gst::ClockType, #[case] num_sec_to_record: u64, #[case] num_sec_to_failure: u64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment describing what this test is supposed to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
let _ = launch_pipeline_and_get_summary(format!("{} simulate-failure-after-sec={}", pipeline_description, num_sec_to_failure).as_ref()); | ||
|
||
info!("#### Read recorded stream from Pravega, no demux, no decoding, part 1"); | ||
let pipeline_description_read = format!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should test that the video is also decodable. Use the code from https://github.com/pravega/gstreamer-pravega/blob/master/integration-test/src/rtsp_tests.rs#L200-L228. Some frames around the ungraceful stop may be corrupted but others before and after should be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Signed-off-by: Luis Liu <[email protected]>
ccedf96
to
6f24702
Compare
Signed-off-by: Luis Liu <[email protected]>
simulate-failure-after-sec
instead ofsimulate-failure-at
as pravegatimestamp doesn't support the construct from a datetime string.gst::FlowError::Error
instead of close pravega byte writer as drop writer dosen't seem to be working and rust client dosen't provide with the close method.