tests: Make tests easier to follow along by printing progress

This commit is contained in:
Joni Räsänen 2022-02-03 11:41:02 +02:00
parent f176da72d8
commit 94b99776a4
2 changed files with 18 additions and 0 deletions

View File

@ -64,6 +64,11 @@ TEST(RTPTests, send_too_much)
{
std::cout << "Failed to send RTP frame!" << std::endl;
}
if (i % 1000 == 999)
{
std::cout << "Sent " << (i + 1) * 100 / 10000 << " % of data" << std::endl;
}
}
EXPECT_NE(nullptr, sender);

View File

@ -70,6 +70,11 @@ TEST(RTCPTests, rtcp) {
{
EXPECT_EQ(RTP_OK, local_stream->push_frame((uint8_t*)buffer, PAYLOAD_LEN, RTP_NO_FLAGS));
if (i % (SEND_TEST_PACKETS/10) == SEND_TEST_PACKETS/10 - 1)
{
std::cout << "Sent " << (i + 1) * 100 / SEND_TEST_PACKETS << " % of data" << std::endl;
}
wait_until_next_frame(start, i);
}
}
@ -127,12 +132,20 @@ TEST(RTCP_reopen_receiver, rtcp) {
wait_until_next_frame(start, i);
if (i % (SEND_TEST_PACKETS/10) == SEND_TEST_PACKETS/10 - 1)
{
std::cout << "Sent " << (i + 1) * 100 / SEND_TEST_PACKETS << " % of data" << std::endl;
}
if (i == SEND_TEST_PACKETS/2)
{
if (remote_stream)
{
std::cout << "Closing and reopening receiver for testing purposes" << std::endl;
remote_session->destroy_stream(remote_stream);
remote_stream = remote_session->create_stream(REMOTE_PORT, LOCAL_PORT, RTP_FORMAT_GENERIC, flags);
EXPECT_NE(nullptr, remote_stream);
}
}
}