mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
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:
@@ -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();
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <fairlogger/Logger.h>
|
||||
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
namespace fair::mq::test
|
||||
{
|
||||
@@ -26,11 +25,6 @@ class Sender : public Device
|
||||
{}
|
||||
|
||||
protected:
|
||||
auto Init() -> void override
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
|
||||
auto Run() -> void override
|
||||
{
|
||||
auto msg = NewMessage();
|
||||
|
||||
Reference in New Issue
Block a user