Fix race condition in unit test.

Removing an input stream immediately after it's created causes a race
to read the entire file before the reader gets the signal to stop.
This commit is contained in:
Jon Siwek 2013-10-28 13:24:24 -05:00
parent 8d0a74d606
commit b255aedc26

View file

@ -23,7 +23,6 @@ event bro_init()
local source: string = "../input.log"; local source: string = "../input.log";
Input::add_analysis([$source=source, $reader=Input::READER_BINARY, Input::add_analysis([$source=source, $reader=Input::READER_BINARY,
$mode=Input::MANUAL, $name=source]); $mode=Input::MANUAL, $name=source]);
Input::remove(source);
} }
event file_state_remove(f: fa_file) &priority=-10 event file_state_remove(f: fa_file) &priority=-10