mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Improve a weird stats unit test
This commit is contained in:
parent
d3e8f2cff8
commit
3251792ddb
3 changed files with 8 additions and 13 deletions
4
CHANGES
4
CHANGES
|
@ -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
|
2.6-beta2-62 | 2018-11-01 20:39:07 -0500
|
||||||
|
|
||||||
* Fix Travis script typo (Jon Siwek, Corelight)
|
* Fix Travis script typo (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-beta2-62
|
2.6-beta2-64
|
||||||
|
|
|
@ -38,11 +38,7 @@ event Broker::peer_lost(endpoint: Broker::EndpointInfo, msg: string)
|
||||||
event ready_again()
|
event ready_again()
|
||||||
{
|
{
|
||||||
Reporter::net_weird("weird1");
|
Reporter::net_weird("weird1");
|
||||||
|
schedule 5secs { terminate_me() };
|
||||||
if ( Cluster::node == "worker-2" )
|
|
||||||
{
|
|
||||||
schedule 5secs { terminate_me() };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event ready_for_data()
|
event ready_for_data()
|
||||||
|
@ -75,19 +71,14 @@ event ready_for_data()
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
||||||
|
|
||||||
event bro_init()
|
|
||||||
{
|
|
||||||
Broker::auto_publish(Cluster::worker_topic, ready_for_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
global peer_count = 0;
|
global peer_count = 0;
|
||||||
|
|
||||||
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
|
event Cluster::node_up(name: string, id: string)
|
||||||
{
|
{
|
||||||
++peer_count;
|
++peer_count;
|
||||||
|
|
||||||
if ( peer_count == 2 )
|
if ( peer_count == 2 )
|
||||||
event ready_for_data();
|
Broker::publish(Cluster::worker_topic, ready_for_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue