From 34d070d487f991965cef29c2c24ddacb036f28b7 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 23 Apr 2024 14:51:21 +0800 Subject: [PATCH] Fix utest fail. --- trunk/src/utest/srs_utest_rtmp.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/trunk/src/utest/srs_utest_rtmp.cpp b/trunk/src/utest/srs_utest_rtmp.cpp index 9a44a5861de..66aa31745d7 100644 --- a/trunk/src/utest/srs_utest_rtmp.cpp +++ b/trunk/src/utest/srs_utest_rtmp.cpp @@ -1895,8 +1895,16 @@ VOID TEST(ProtocolRTMPTest, ServerFMLEStart) HELPER_ASSERT_SUCCESS(p.expect_message(&msg, &pkt)); srs_freep(msg); srs_freep(pkt); + } + + HELPER_EXPECT_SUCCESS(r.start_publishing(1)); + + if (true) { + tio.in_buffer.append(&io.out_buffer); // publish response onStatus(NetStream.Publish.Start) + SrsCommonMessage* msg = NULL; + SrsCallPacket* pkt = NULL; HELPER_ASSERT_SUCCESS(p.expect_message(&msg, &pkt)); srs_freep(msg); srs_freep(pkt); @@ -1934,8 +1942,16 @@ VOID TEST(ProtocolRTMPTest, ServerHaivisionPublish) HELPER_ASSERT_SUCCESS(p.expect_message(&msg, &pkt)); srs_freep(msg); srs_freep(pkt); + } + + HELPER_EXPECT_SUCCESS(r.start_publishing(1)); + + if (true) { + tio.in_buffer.append(&io.out_buffer); // publish response onStatus(NetStream.Publish.Start) + SrsCommonMessage* msg = NULL; + SrsCallPacket* pkt = NULL; HELPER_ASSERT_SUCCESS(p.expect_message(&msg, &pkt)); srs_freep(msg); srs_freep(pkt); @@ -2005,6 +2021,7 @@ VOID TEST(ProtocolRTMPTest, ServerFlashPublish) SrsRtmpServer r(&io); HELPER_EXPECT_SUCCESS(r.start_flash_publish(1)); + HELPER_EXPECT_SUCCESS(r.start_publishing(1)); if (true) { MockBufferIO tio;