zeek/testing/btest/language/timeout.zeek
Jon Siwek d917737766 Rewrite the btest for when-statement timeouts
To avoid a memory leak in DNS lookups that's hard to work around and
does not otherwise effect typical operation when Zeek is allowed to
continue to run after zeek_init().
2020-01-02 12:05:49 -08:00

21 lines
340 B
Text

# @TEST-EXEC: btest-bg-run zeek zeek -b %INPUT
# @TEST-EXEC: btest-bg-wait 10
# @TEST-EXEC: btest-diff zeek/.stdout
redef exit_only_after_terminate=T;
global myset = set("yes");
event zeek_init()
{
when ( "no" in myset )
{
print "lookup successful";
terminate();
}
timeout 0.25sec
{
print "timeout";
terminate();
}
}