Integration test for ungraceful stop of camera recorder pipeline#150
Integration test for ungraceful stop of camera recorder pipeline#150
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.
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.
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.
Add a comment describing what this test is supposed to do.
| 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.
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.
Signed-off-by: Luis Liu <luis_liu@dell.com>
ccedf96 to
6f24702
Compare
Signed-off-by: Luis Liu <luis_liu@dell.com>
simulate-failure-after-secinstead ofsimulate-failure-atas pravegatimestamp doesn't support the construct from a datetime string.gst::FlowError::Errorinstead of close pravega byte writer as drop writer dosen't seem to be working and rust client dosen't provide with the close method.