File tree Expand file tree Collapse file tree
tests/componenttests/server/tests/mediaPipeline Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ constexpr bool kAsync{true};
3434} // namespace
3535
3636using testing::_;
37+ using testing::AtLeast;
3738using testing::Invoke;
3839using testing::Return;
3940using testing::StrEq;
@@ -51,6 +52,8 @@ class FlushTest : public MediaPipelineTest
5152 {
5253 GstElementFactory *elementFactory = gst_element_factory_find (" fakesrc" );
5354 m_audioSink = gst_element_factory_create (elementFactory, nullptr );
55+ EXPECT_CALL (*m_glibWrapperMock, gTypeName (G_OBJECT_TYPE (m_audioSink))).WillRepeatedly (Return (" audio_sink" ));
56+ EXPECT_CALL (*m_gstWrapperMock, gstObjectUnref (m_audioSink)).Times (AtLeast (0 ));
5457 gst_object_unref (elementFactory);
5558 }
5659
@@ -66,7 +69,6 @@ class FlushTest : public MediaPipelineTest
6669 gboolean *asyncPtr = reinterpret_cast <gboolean *>(element);
6770 *asyncPtr = static_cast <gboolean>(kAsync );
6871 }));
69- EXPECT_CALL (*m_gstWrapperMock, gstObjectUnref (m_audioSink));
7072 EXPECT_CALL (*m_gstWrapperMock, gstEventNewFlushStart ()).WillOnce (Return (&m_flushStartEvent));
7173 EXPECT_CALL (*m_gstWrapperMock, gstElementSendEvent (GST_ELEMENT (&m_audioAppSrc), &m_flushStartEvent))
7274 .WillOnce (Return (true ));
@@ -232,7 +234,7 @@ class FlushTest : public MediaPipelineTest
232234 *
233235 * Code:
234236 */
235- TEST_F (FlushTest, DISABLED_flushAudioSourceSuccess )
237+ TEST_F (FlushTest, flushAudioSourceSuccess )
236238{
237239 // Step 1: Create a new media session
238240 createSession ();
You can’t perform that action at this time.
0 commit comments