mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +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
|
||||
|
||||
* Fix Travis script typo (Jon Siwek, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.6-beta2-62
|
||||
2.6-beta2-64
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue