Parallelize communication tests using btest TEST-PORT

This commit is contained in:
Jon Siwek 2018-11-04 15:29:59 -06:00
parent 7ec480f05d
commit 907297ba59
67 changed files with 299 additions and 230 deletions

View file

@ -1,4 +1,4 @@
# @TEST-SERIALIZE: comm
# @TEST-PORT: BROKER_PORT
#
# @TEST-EXEC: btest-bg-run recv "bro -b ../recv.bro >recv.out"
# @TEST-EXEC: btest-bg-run send "bro -b ../send.bro >send.out"
@ -19,7 +19,7 @@ event bro_init()
{
Broker::subscribe("bro/event/my_topic");
Broker::auto_publish("bro/event/my_topic", ping);
Broker::peer("127.0.0.1");
Broker::peer("127.0.0.1", to_port(getenv("BROKER_PORT")));
}
function send_event()
@ -63,7 +63,7 @@ event bro_init()
{
Broker::subscribe("bro/event/my_topic");
Broker::auto_publish("bro/event/my_topic", pong);
Broker::listen("127.0.0.1");
Broker::listen("127.0.0.1", to_port(getenv("BROKER_PORT")));
}
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)