From ee0d2e0c55875fb2e52d32d3e6957bc9b826c080 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Tue, 11 Apr 2017 16:44:45 +0200 Subject: [PATCH] add debug output to test devices --- fairmq/test/helper/devices/TestPub.cxx | 6 +++++- fairmq/test/helper/devices/TestSub.cxx | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fairmq/test/helper/devices/TestPub.cxx b/fairmq/test/helper/devices/TestPub.cxx index 13d62bd9..4162e8bc 100644 --- a/fairmq/test/helper/devices/TestPub.cxx +++ b/fairmq/test/helper/devices/TestPub.cxx @@ -34,7 +34,11 @@ class Pub : public FairMQDevice auto msg = FairMQMessagePtr{NewMessage()}; auto d1 = Send(msg, "data"); - if (d1 < 0) + if (d1 >= 0) + { + LOG(INFO) << "Sent data: d1 = " << d1; + } + else { LOG(ERROR) << "Failed sending data: d1 = " << d1; } diff --git a/fairmq/test/helper/devices/TestSub.cxx b/fairmq/test/helper/devices/TestSub.cxx index fae86902..adb8c375 100644 --- a/fairmq/test/helper/devices/TestSub.cxx +++ b/fairmq/test/helper/devices/TestSub.cxx @@ -28,13 +28,19 @@ class Sub : public FairMQDevice auto r1 = Send(ready, "control"); if (r1 >= 0) { + LOG(INFO) << "Sent first control signal"; auto msg = FairMQMessagePtr{NewMessage()}; auto d1 = Receive(msg, "data"); if (d1 >= 0) { + LOG(INFO) << "Received data"; auto ack = FairMQMessagePtr{NewMessage()}; auto a1 = Send(ack, "control"); - if (a1 < 0) + if (a1 >= 0) + { + LOG(INFO) << "Sent second control signal"; + } + else { LOG(ERROR) << "Failed sending ack signal: a1 = " << a1; }