diff --git a/CHANGES b/CHANGES index 9776dade90..f138ab3963 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +2.6-569 | 2019-07-03 13:03:22 -0700 + + * Improve stability of a unit test (Jon Siwek, Corelight) + 2.6-568 | 2019-07-03 11:50:56 -0700 * Add clang-tidy rule to CMake including a base configuration (Tim Wojtulewicz, Corelight) diff --git a/VERSION b/VERSION index 4c7197eb98..24544f81be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-568 +2.6-569 diff --git a/testing/btest/scripts/base/frameworks/logging/field-extension-cluster-error.zeek b/testing/btest/scripts/base/frameworks/logging/field-extension-cluster-error.zeek index 6e66d56bb5..6c4f9af6e4 100644 --- a/testing/btest/scripts/base/frameworks/logging/field-extension-cluster-error.zeek +++ b/testing/btest/scripts/base/frameworks/logging/field-extension-cluster-error.zeek @@ -56,7 +56,7 @@ event slow_death() schedule 2sec { die() }; } -event kill_worker() +event ready() { Reporter::info("qux"); Broker::publish("death", slow_death); @@ -69,20 +69,30 @@ event zeek_init() Broker::subscribe("death"); suspend_processing(); } + + if ( Cluster::node == "manager-1" ) + { + Broker::subscribe("ready"); + } + } + +global conn_count = 0; + +event new_connection(c: connection) + { + ++conn_count; + + if ( conn_count == 30 ) + { + Reporter::info("qux"); + Broker::publish("ready", ready); + } } event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string) { - if ( Cluster::node == "manager-1" ) - { - schedule 2sec { kill_worker() }; - } - if ( Cluster::node == "worker-1" ) - { continue_processing(); - Reporter::info("qux"); - } } event Broker::peer_lost(endpoint: Broker::EndpointInfo, msg: string)