Skip to content

Commit

Permalink
[tests] A basic check for initial group stats values
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Feb 26, 2021
1 parent 93f710f commit 6254c1d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test_bonding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,20 @@ TEST(Bonding, CloseGroupAndSocket)
}
}

// Some basic checks for group stats
SRT_TRACEBSTATS stats;
EXPECT_EQ(srt_bstats(ss, &stats, true), SRT_SUCCESS);
EXPECT_EQ(stats.pktSent, 0);
EXPECT_EQ(stats.pktSentTotal, 0);
EXPECT_EQ(stats.pktSentUnique, 0);
EXPECT_EQ(stats.pktSentUniqueTotal, 0);
EXPECT_EQ(stats.pktRecv, 0);
EXPECT_EQ(stats.pktRecvTotal, 0);
EXPECT_EQ(stats.pktRecvUnique, 0);
EXPECT_EQ(stats.pktRecvUniqueTotal, 0);
EXPECT_EQ(stats.pktRcvDrop, 0);
EXPECT_EQ(stats.pktRcvDropTotal, 0);

std::cout << "Starting thread for sending:\n";
std::thread sender([ss] {
char buf[1316];
Expand Down

0 comments on commit 6254c1d

Please sign in to comment.