mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Use different ports in tests to prevent parallel run fail
This commit is contained in:
parent
7062a3d280
commit
f3bebe9321
|
@ -33,10 +33,18 @@ int main(int argc, char** argv)
|
||||||
testPub.SetProperty(FairMQTestPub::Id, "testPub");
|
testPub.SetProperty(FairMQTestPub::Id, "testPub");
|
||||||
|
|
||||||
FairMQChannel controlChannel("pull", "bind", "tcp://127.0.0.1:5555");
|
FairMQChannel controlChannel("pull", "bind", "tcp://127.0.0.1:5555");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
controlChannel.UpdateAddress("tcp://127.0.0.1:5755");
|
||||||
|
}
|
||||||
controlChannel.UpdateRateLogging(0);
|
controlChannel.UpdateRateLogging(0);
|
||||||
testPub.fChannels["control"].push_back(controlChannel);
|
testPub.fChannels["control"].push_back(controlChannel);
|
||||||
|
|
||||||
FairMQChannel pubChannel("pub", "bind", "tcp://127.0.0.1:5556");
|
FairMQChannel pubChannel("pub", "bind", "tcp://127.0.0.1:5556");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
pubChannel.UpdateAddress("tcp://127.0.0.1:5756");
|
||||||
|
}
|
||||||
pubChannel.UpdateRateLogging(0);
|
pubChannel.UpdateRateLogging(0);
|
||||||
testPub.fChannels["data"].push_back(pubChannel);
|
testPub.fChannels["data"].push_back(pubChannel);
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,18 @@ int main(int argc, char** argv)
|
||||||
testSub.SetProperty(FairMQTestSub::Id, "testSub_" + std::to_string(getpid()));
|
testSub.SetProperty(FairMQTestSub::Id, "testSub_" + std::to_string(getpid()));
|
||||||
|
|
||||||
FairMQChannel controlChannel("push", "connect", "tcp://127.0.0.1:5555");
|
FairMQChannel controlChannel("push", "connect", "tcp://127.0.0.1:5555");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
controlChannel.UpdateAddress("tcp://127.0.0.1:5755");
|
||||||
|
}
|
||||||
controlChannel.UpdateRateLogging(0);
|
controlChannel.UpdateRateLogging(0);
|
||||||
testSub.fChannels["control"].push_back(controlChannel);
|
testSub.fChannels["control"].push_back(controlChannel);
|
||||||
|
|
||||||
FairMQChannel subChannel("sub", "connect", "tcp://127.0.0.1:5556");
|
FairMQChannel subChannel("sub", "connect", "tcp://127.0.0.1:5556");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
subChannel.UpdateAddress("tcp://127.0.0.1:5756");
|
||||||
|
}
|
||||||
subChannel.UpdateRateLogging(0);
|
subChannel.UpdateRateLogging(0);
|
||||||
testSub.fChannels["data"].push_back(subChannel);
|
testSub.fChannels["data"].push_back(subChannel);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,11 @@ int main(int argc, char** argv)
|
||||||
testPull.SetProperty(FairMQTestPull::Id, "testPull");
|
testPull.SetProperty(FairMQTestPull::Id, "testPull");
|
||||||
|
|
||||||
FairMQChannel pullChannel("pull", "connect", "tcp://127.0.0.1:5557");
|
FairMQChannel pullChannel("pull", "connect", "tcp://127.0.0.1:5557");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
pullChannel.UpdateAddress("tcp://127.0.0.1:5757");
|
||||||
|
}
|
||||||
|
pullChannel.UpdateRateLogging(0);
|
||||||
testPull.fChannels["data"].push_back(pullChannel);
|
testPull.fChannels["data"].push_back(pullChannel);
|
||||||
|
|
||||||
testPull.ChangeState("INIT_DEVICE");
|
testPull.ChangeState("INIT_DEVICE");
|
||||||
|
|
|
@ -34,6 +34,11 @@ int main(int argc, char** argv)
|
||||||
testPush.SetProperty(FairMQTestPush::Id, "testPush");
|
testPush.SetProperty(FairMQTestPush::Id, "testPush");
|
||||||
|
|
||||||
FairMQChannel pushChannel("push", "bind", "tcp://127.0.0.1:5557");
|
FairMQChannel pushChannel("push", "bind", "tcp://127.0.0.1:5557");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
pushChannel.UpdateAddress("tcp://127.0.0.1:5757");
|
||||||
|
}
|
||||||
|
pushChannel.UpdateRateLogging(0);
|
||||||
testPush.fChannels["data"].push_back(pushChannel);
|
testPush.fChannels["data"].push_back(pushChannel);
|
||||||
|
|
||||||
testPush.ChangeState("INIT_DEVICE");
|
testPush.ChangeState("INIT_DEVICE");
|
||||||
|
|
|
@ -35,6 +35,11 @@ int main(int argc, char** argv)
|
||||||
testRep.SetProperty(FairMQTestRep::Id, "testRep");
|
testRep.SetProperty(FairMQTestRep::Id, "testRep");
|
||||||
|
|
||||||
FairMQChannel repChannel("rep", "bind", "tcp://127.0.0.1:5558");
|
FairMQChannel repChannel("rep", "bind", "tcp://127.0.0.1:5558");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
repChannel.UpdateAddress("tcp://127.0.0.1:5758");
|
||||||
|
}
|
||||||
|
repChannel.UpdateRateLogging(0);
|
||||||
testRep.fChannels["data"].push_back(repChannel);
|
testRep.fChannels["data"].push_back(repChannel);
|
||||||
|
|
||||||
testRep.ChangeState("INIT_DEVICE");
|
testRep.ChangeState("INIT_DEVICE");
|
||||||
|
|
|
@ -36,6 +36,11 @@ int main(int argc, char** argv)
|
||||||
testReq.SetProperty(FairMQTestReq::Id, "testReq" + std::to_string(getpid()));
|
testReq.SetProperty(FairMQTestReq::Id, "testReq" + std::to_string(getpid()));
|
||||||
|
|
||||||
FairMQChannel reqChannel("req", "connect", "tcp://127.0.0.1:5558");
|
FairMQChannel reqChannel("req", "connect", "tcp://127.0.0.1:5558");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
reqChannel.UpdateAddress("tcp://127.0.0.1:5758");
|
||||||
|
}
|
||||||
|
reqChannel.UpdateRateLogging(0);
|
||||||
testReq.fChannels["data"].push_back(reqChannel);
|
testReq.fChannels["data"].push_back(reqChannel);
|
||||||
|
|
||||||
testReq.ChangeState("INIT_DEVICE");
|
testReq.ChangeState("INIT_DEVICE");
|
||||||
|
|
|
@ -108,6 +108,10 @@ int main(int argc, char** argv)
|
||||||
dataOutChannel.UpdateType("push");
|
dataOutChannel.UpdateType("push");
|
||||||
dataOutChannel.UpdateMethod("bind");
|
dataOutChannel.UpdateMethod("bind");
|
||||||
dataOutChannel.UpdateAddress("tcp://127.0.0.1:5559");
|
dataOutChannel.UpdateAddress("tcp://127.0.0.1:5559");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
dataOutChannel.UpdateAddress("tcp://127.0.0.1:5759");
|
||||||
|
}
|
||||||
dataOutChannel.UpdateSndBufSize(1000);
|
dataOutChannel.UpdateSndBufSize(1000);
|
||||||
dataOutChannel.UpdateRcvBufSize(1000);
|
dataOutChannel.UpdateRcvBufSize(1000);
|
||||||
dataOutChannel.UpdateRateLogging(0);
|
dataOutChannel.UpdateRateLogging(0);
|
||||||
|
@ -117,6 +121,10 @@ int main(int argc, char** argv)
|
||||||
dataInChannel.UpdateType("pull");
|
dataInChannel.UpdateType("pull");
|
||||||
dataInChannel.UpdateMethod("bind");
|
dataInChannel.UpdateMethod("bind");
|
||||||
dataInChannel.UpdateAddress("tcp://127.0.0.1:5560");
|
dataInChannel.UpdateAddress("tcp://127.0.0.1:5560");
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
dataInChannel.UpdateAddress("tcp://127.0.0.1:5760");
|
||||||
|
}
|
||||||
dataInChannel.UpdateSndBufSize(1000);
|
dataInChannel.UpdateSndBufSize(1000);
|
||||||
dataInChannel.UpdateRcvBufSize(1000);
|
dataInChannel.UpdateRcvBufSize(1000);
|
||||||
dataInChannel.UpdateRateLogging(0);
|
dataInChannel.UpdateRateLogging(0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user