Make a paraglob unit test parallelizable

This commit is contained in:
Jon Siwek 2019-06-25 12:45:31 -07:00
parent 0d96e71f49
commit f810de11fa
3 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,8 @@
2.6-526 | 2019-06-25 12:45:31 -0700
* Make a paraglob unit test parallelizable (Jon Siwek, Corelight)
2.6-523 | 2019-06-25 10:38:24 -0700 2.6-523 | 2019-06-25 10:38:24 -0700
* GH-427: improve default ID values shown by Zeekygen * GH-427: improve default ID values shown by Zeekygen

View file

@ -1 +1 @@
2.6-523 2.6-526

View file

@ -3,7 +3,7 @@
# @TEST-EXEC: btest-bg-run recv "zeek -B broker -b ../recv.zeek >recv.out" # @TEST-EXEC: btest-bg-run recv "zeek -B broker -b ../recv.zeek >recv.out"
# @TEST-EXEC: btest-bg-run send "zeek -B broker -b ../send.zeek >send.out" # @TEST-EXEC: btest-bg-run send "zeek -B broker -b ../send.zeek >send.out"
# #
# @TEST-EXEC: btest-bg-wait 30 # @TEST-EXEC: btest-bg-wait 45
# @TEST-EXEC: btest-diff recv/recv.out # @TEST-EXEC: btest-diff recv/recv.out
# @TEST-EXEC: btest-diff send/send.out # @TEST-EXEC: btest-diff send/send.out
@ -21,7 +21,7 @@ event zeek_init()
print "Starting send."; print "Starting send.";
print paraglob_match(p, "hello"); print paraglob_match(p, "hello");
Broker::subscribe("bro/event/my_topic"); Broker::subscribe("bro/event/my_topic");
Broker::peer("127.0.0.1", 9999/tcp); Broker::peer("127.0.0.1", to_port(getenv("BROKER_PORT")));
print "is_remote should be F, and is", is_remote_event(); print "is_remote should be F, and is", is_remote_event();
} }
@ -70,7 +70,7 @@ global pong: event(msg: opaque of paraglob, c: count);
event zeek_init() event zeek_init()
{ {
Broker::subscribe("bro/event/my_topic"); Broker::subscribe("bro/event/my_topic");
Broker::listen("127.0.0.1", 9999/tcp); Broker::listen("127.0.0.1", to_port(getenv("BROKER_PORT")));
} }
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string) event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)