BrokerStore <-> Zeek Tables: cleanup and bug workaround

This commit is contained in:
Johanna Amann 2020-07-13 17:22:23 -07:00
parent 7c37226eaa
commit 1888d6acae
3 changed files with 14 additions and 4 deletions

View file

@ -20,8 +20,8 @@ const char* attr_name(AttrTag t)
"&read_expire", "&write_expire", "&create_expire", "&read_expire", "&write_expire", "&create_expire",
"&raw_output", "&priority", "&raw_output", "&priority",
"&group", "&log", "&error_handler", "&type_column", "&group", "&log", "&error_handler", "&type_column",
"(&tracked)", "&on_change", "&broker_store", "(&tracked)", "&on_change", "&broker_store",
"&broker_allow_complex_type", "&backend", "&deprecated", "&broker_allow_complex_type", "&backend", "&deprecated",
}; };
return attr_names[int(t)]; return attr_names[int(t)];

View file

@ -921,7 +921,9 @@ void Manager::Process()
{ {
// Ensure that time gets update before processing broker messages, or events // Ensure that time gets update before processing broker messages, or events
// based on them might get scheduled wrong. // based on them might get scheduled wrong.
net_update_time(current_time()); // Fixme: unclear if final solution - see https://github.com/zeek/broker/issues/135
if ( use_real_time )
net_update_time(current_time());
bool had_input = false; bool had_input = false;

View file

@ -1,10 +1,18 @@
# So - this test currently is not really that great. The goal was to test expiration after
# syncing values with broker. However, it turns out that the delays introduced by broker seem
# a bit random - and too high to really test this without the test taking forever.
#
# so - instead we just check that expiries do indeed happen - however the ordering is not as
# guaranteed as I would have liked to have it.
# @TEST-PORT: BROKER_PORT # @TEST-PORT: BROKER_PORT
# @TEST-EXEC: btest-bg-run master "zeek -B broker -b ../master.zeek >../master.out" # @TEST-EXEC: btest-bg-run master "zeek -B broker -b ../master.zeek >../master.out"
# @TEST-EXEC: btest-bg-run clone "zeek -B broker -b ../clone.zeek >../clone.out" # @TEST-EXEC: btest-bg-run clone "zeek -B broker -b ../clone.zeek >../clone.out"
# @TEST-EXEC: btest-bg-wait 20 # @TEST-EXEC: btest-bg-wait 20
# #
# @TEST-EXEC: btest-diff clone.out # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff clone.out
@TEST-START-FILE master.zeek @TEST-START-FILE master.zeek
redef exit_only_after_terminate = T; redef exit_only_after_terminate = T;