mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Exec module changes/fixes.
- Give Dir::monitor() a param for the polling interval, so different dirs can be monitored at different frequencies. - Fix race in Exec::run() when reading extra output files produced by a process -- it was possible for Exec::run() to return before all extra output files had been fully read. - Add test cases.
This commit is contained in:
parent
325f0c2a3f
commit
73eb87a41e
10 changed files with 299 additions and 42 deletions
25
testing/btest/scripts/base/utils/active-http.test
Normal file
25
testing/btest/scripts/base/utils/active-http.test
Normal file
|
@ -0,0 +1,25 @@
|
|||
# @TEST-EXEC: btest-bg-run httpd python $SCRIPTS/httpd.py --max 1
|
||||
# @TEST-EXEC: sleep 3
|
||||
# @TEST-EXEC: btest-bg-run bro bro -b %INPUT
|
||||
# @TEST-EXEC: btest-bg-wait 15
|
||||
# @TEST-EXEC: btest-diff bro/.stdout
|
||||
|
||||
@load base/utils/active-http
|
||||
|
||||
redef exit_only_after_terminate = T;
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
local req = ActiveHTTP::Request($url="localhost:32123");
|
||||
|
||||
when ( local resp = ActiveHTTP::request(req) )
|
||||
{
|
||||
print resp;
|
||||
terminate();
|
||||
}
|
||||
timeout 1min
|
||||
{
|
||||
print "HTTP request timeout";
|
||||
terminate();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue