Fix nanomsg tests

This commit is contained in:
Alexey Rybalchenko
2017-02-27 16:40:07 +01:00
committed by Mohammad Al-Turany
parent 07b760218f
commit c78b7e4cfa
7 changed files with 77 additions and 17 deletions

View File

@@ -15,6 +15,9 @@
#include "FairMQLogger.h"
#include "FairMQTestPull.h"
#include <chrono>
#include <thread>
int main(int argc, char** argv)
{
reinit_logger(false);
@@ -59,6 +62,12 @@ int main(int argc, char** argv)
testPull.ChangeState("RUN");
testPull.WaitForEndOfState("RUN");
// nanomsg does not implement the LINGER option. Give the sockets some time before their queues are terminated
if (transport == "nanomsg")
{
std::this_thread::sleep_for(std::chrono::seconds(1));
}
testPull.ChangeState("RESET_TASK");
testPull.WaitForEndOfState("RESET_TASK");

View File

@@ -15,6 +15,9 @@
#include "FairMQLogger.h"
#include "FairMQTestPush.h"
#include <chrono>
#include <thread>
int main(int argc, char** argv)
{
reinit_logger(false);
@@ -60,6 +63,12 @@ int main(int argc, char** argv)
testPush.ChangeState("RUN");
testPush.WaitForEndOfState("RUN");
// nanomsg does not implement the LINGER option. Give the sockets some time before their queues are terminated
if (transport == "nanomsg")
{
std::this_thread::sleep_for(std::chrono::seconds(1));
}
testPush.ChangeState("RESET_TASK");
testPush.WaitForEndOfState("RESET_TASK");