mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
fix(test): check the results of Bind, Connect, Send and Receive
- the message, region, channel and transport tests ignored the return values of these calls; a failed bind or a short transfer showed up later as an unrelated failure, or not at all - assert each result where the test uses it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,13 +110,13 @@ auto testConnectedPeers(std::string const& transport)
|
||||
|
||||
Channel ch1("ch1", "pair", factory);
|
||||
ASSERT_EQ(ch1.GetNumberOfConnectedPeers(), zero);
|
||||
ch1.Bind(address);
|
||||
ASSERT_TRUE(ch1.Bind(address));
|
||||
ASSERT_EQ(ch1.GetNumberOfConnectedPeers(), zero);
|
||||
|
||||
{
|
||||
Channel ch2("ch2", "pair", factory);
|
||||
ASSERT_EQ(ch2.GetNumberOfConnectedPeers(), zero);
|
||||
ch2.Connect(address);
|
||||
ASSERT_TRUE(ch2.Connect(address));
|
||||
std::this_thread::sleep_for(100ms);
|
||||
ASSERT_EQ(ch1.GetNumberOfConnectedPeers(), one);
|
||||
ASSERT_EQ(ch2.GetNumberOfConnectedPeers(), one);
|
||||
|
||||
Reference in New Issue
Block a user