mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Improve reliability of missing-file-initially.bro test
This test has failed numerous times on Travis CI. Fixes to make this test more reliable: create the does-not-exist.dat file atomically, and increase wait time after starting bro in order to give all input streams a chance to try to read the input file. Also added the input stream name to the test output, in order to make output easier to understand if the test fails again.
This commit is contained in:
parent
135fa9dc69
commit
e16cc13667
2 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
now it does
|
||||
and more!
|
||||
now it does
|
||||
and more!
|
||||
Streaming still works
|
||||
input: now it does
|
||||
input: and more!
|
||||
inputstream: now it does
|
||||
inputstream: and more!
|
||||
inputstream: Streaming still works
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
# failing behavior.
|
||||
|
||||
# @TEST-EXEC: btest-bg-run bro bro %INPUT
|
||||
# @TEST-EXEC: sleep 2; cp does-exist.dat does-not-exist.dat
|
||||
# @TEST-EXEC: sleep 2; mv does-not-exist.dat does-not-exist-again.dat; echo "Streaming still works" >> does-not-exist-again.dat
|
||||
# @TEST-EXEC: sleep 10
|
||||
# @TEST-EXEC: mv does-exist.dat does-not-exist.dat
|
||||
# @TEST-EXEC: sleep 2
|
||||
# @TEST-EXEC: mv does-not-exist.dat does-not-exist-again.dat
|
||||
# @TEST-EXEC: echo "Streaming still works" >> does-not-exist-again.dat
|
||||
# @TEST-EXEC: btest-bg-wait -k 3
|
||||
# @TEST-EXEC: btest-diff bro/.stdout
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff bro/.stderr
|
||||
|
@ -30,7 +33,7 @@ type Val: record {
|
|||
|
||||
event line(description: Input::EventDescription, tpe: Input::Event, v: Val)
|
||||
{
|
||||
print v$line;
|
||||
print fmt("%s: %s", description$name, v$line);
|
||||
}
|
||||
|
||||
event line2(description: Input::EventDescription, tpe: Input::Event, v: Val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue