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:
Claude
2026-11-03 14:05:38 +00:00
committed by Dennis Klein
parent df7d99bb76
commit ddb365efe4
4 changed files with 31 additions and 31 deletions

View File

@@ -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);