Use different ports in tests to prevent parallel run fail

This commit is contained in:
Alexey Rybalchenko
2016-06-01 11:49:33 +02:00
parent 7062a3d280
commit f3bebe9321
7 changed files with 44 additions and 0 deletions

View File

@@ -33,10 +33,18 @@ int main(int argc, char** argv)
testPub.SetProperty(FairMQTestPub::Id, "testPub");
FairMQChannel controlChannel("pull", "bind", "tcp://127.0.0.1:5555");
if (argc == 2)
{
controlChannel.UpdateAddress("tcp://127.0.0.1:5755");
}
controlChannel.UpdateRateLogging(0);
testPub.fChannels["control"].push_back(controlChannel);
FairMQChannel pubChannel("pub", "bind", "tcp://127.0.0.1:5556");
if (argc == 2)
{
pubChannel.UpdateAddress("tcp://127.0.0.1:5756");
}
pubChannel.UpdateRateLogging(0);
testPub.fChannels["data"].push_back(pubChannel);

View File

@@ -36,10 +36,18 @@ int main(int argc, char** argv)
testSub.SetProperty(FairMQTestSub::Id, "testSub_" + std::to_string(getpid()));
FairMQChannel controlChannel("push", "connect", "tcp://127.0.0.1:5555");
if (argc == 2)
{
controlChannel.UpdateAddress("tcp://127.0.0.1:5755");
}
controlChannel.UpdateRateLogging(0);
testSub.fChannels["control"].push_back(controlChannel);
FairMQChannel subChannel("sub", "connect", "tcp://127.0.0.1:5556");
if (argc == 2)
{
subChannel.UpdateAddress("tcp://127.0.0.1:5756");
}
subChannel.UpdateRateLogging(0);
testSub.fChannels["data"].push_back(subChannel);