Skip to content

Commit

Permalink
Use different ports in tests to prevent parallel run fail
Browse files Browse the repository at this point in the history
  • Loading branch information
rbx committed Jun 1, 2016
1 parent f331ea2 commit 7d66a66
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fairmq/test/pub-sub/runTestPub.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 8 additions & 0 deletions fairmq/test/pub-sub/runTestSub.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 5 additions & 0 deletions fairmq/test/push-pull/runTestPull.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ int main(int argc, char** argv)
testPull.SetProperty(FairMQTestPull::Id, "testPull");

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.ChangeState("INIT_DEVICE");
Expand Down
5 changes: 5 additions & 0 deletions fairmq/test/push-pull/runTestPush.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ int main(int argc, char** argv)
testPush.SetProperty(FairMQTestPush::Id, "testPush");

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.ChangeState("INIT_DEVICE");
Expand Down
5 changes: 5 additions & 0 deletions fairmq/test/req-rep/runTestRep.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ int main(int argc, char** argv)
testRep.SetProperty(FairMQTestRep::Id, "testRep");

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.ChangeState("INIT_DEVICE");
Expand Down
5 changes: 5 additions & 0 deletions fairmq/test/req-rep/runTestReq.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ int main(int argc, char** argv)
testReq.SetProperty(FairMQTestReq::Id, "testReq" + std::to_string(getpid()));

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.ChangeState("INIT_DEVICE");
Expand Down
8 changes: 8 additions & 0 deletions fairmq/test/runTransferTimeoutTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ int main(int argc, char** argv)
dataOutChannel.UpdateType("push");
dataOutChannel.UpdateMethod("bind");
dataOutChannel.UpdateAddress("tcp://127.0.0.1:5559");
if (argc == 2)
{
dataOutChannel.UpdateAddress("tcp://127.0.0.1:5759");
}
dataOutChannel.UpdateSndBufSize(1000);
dataOutChannel.UpdateRcvBufSize(1000);
dataOutChannel.UpdateRateLogging(0);
Expand All @@ -117,6 +121,10 @@ int main(int argc, char** argv)
dataInChannel.UpdateType("pull");
dataInChannel.UpdateMethod("bind");
dataInChannel.UpdateAddress("tcp://127.0.0.1:5560");
if (argc == 2)
{
dataInChannel.UpdateAddress("tcp://127.0.0.1:5760");
}
dataInChannel.UpdateSndBufSize(1000);
dataInChannel.UpdateRcvBufSize(1000);
dataInChannel.UpdateRateLogging(0);
Expand Down

0 comments on commit 7d66a66

Please sign in to comment.