Improve a weird stats unit test

This commit is contained in:
Jon Siwek 2018-11-02 08:56:59 -05:00
parent d3e8f2cff8
commit 3251792ddb
3 changed files with 8 additions and 13 deletions

View file

@ -1,4 +1,8 @@
2.6-beta2-64 | 2018-11-02 08:56:59 -0500
* Improve a weird stats unit test (Jon Siwek, Corelight)
2.6-beta2-62 | 2018-11-01 20:39:07 -0500
* Fix Travis script typo (Jon Siwek, Corelight)

View file

@ -1 +1 @@
2.6-beta2-62
2.6-beta2-64

View file

@ -38,12 +38,8 @@ event Broker::peer_lost(endpoint: Broker::EndpointInfo, msg: string)
event ready_again()
{
Reporter::net_weird("weird1");
if ( Cluster::node == "worker-2" )
{
schedule 5secs { terminate_me() };
}
}
event ready_for_data()
{
@ -75,19 +71,14 @@ event ready_for_data()
@if ( Cluster::local_node_type() == Cluster::MANAGER )
event bro_init()
{
Broker::auto_publish(Cluster::worker_topic, ready_for_data);
}
global peer_count = 0;
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
event Cluster::node_up(name: string, id: string)
{
++peer_count;
if ( peer_count == 2 )
event ready_for_data();
Broker::publish(Cluster::worker_topic, ready_for_data);
}
@endif