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 "FairMQTestPub.h"
#include <chrono>
#include <thread>
int main(int argc, char** argv)
{
reinit_logger(false);
@@ -67,6 +70,12 @@ int main(int argc, char** argv)
testPub.ChangeState("RUN");
testPub.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));
}
testPub.ChangeState("RESET_TASK");
testPub.WaitForEndOfState("RESET_TASK");