mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
log-caching-cluster: Wait for X509::known_log_certs to populate
The known_log_certs table is populated asynchronously via broker after a Broker::peer_added. It may take a variable amount of time depending on where we run this test and it has been observed flaky specifically for the arm_debian11 task. Instead of racing, give worker-2 3 seconds for receiving the expected table content before continuing. Fixes #2885
This commit is contained in:
parent
75245bd365
commit
a9a37c865e
1 changed files with 14 additions and 1 deletions
|
@ -41,6 +41,19 @@ event zeek_init()
|
|||
|
||||
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
|
||||
{
|
||||
if ( /worker-2/ in Cluster::node )
|
||||
{
|
||||
when ( |X509::known_log_certs| >= 3 )
|
||||
{
|
||||
continue_processing();
|
||||
}
|
||||
timeout 3sec
|
||||
{
|
||||
Reporter::error("Timeout waiting for X509::known_log_certs to be populated!");
|
||||
terminate();
|
||||
}
|
||||
}
|
||||
else
|
||||
continue_processing();
|
||||
}
|
||||
@endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue