test: wait for conditions instead of fixed sleeps

- Channel.GetNumberOfConnectedPeers slept 100 ms and then expected the
  peer count; on a slow runner the count can change later
- poll the count with a deadline instead
- remove the 500 ms sleep in Init() of the MultipleDevices sender and
  receiver: the transfer does not depend on the order of bind and
  connect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-03 14:10:18 +00:00
committed by Dennis Klein
parent d67a6c0745
commit d4a85086aa
4 changed files with 5 additions and 25 deletions

View File

@@ -13,7 +13,6 @@
#include <fairlogger/Logger.h>
#include <string>
#include <thread>
namespace fair::mq::test
{
@@ -26,11 +25,6 @@ class Receiver : public Device
{}
protected:
auto Init() -> void override
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
}
auto Run() -> void override
{
auto msg = NewMessage();