Commit eb5c3c08 authored by Paul Cammish's avatar Paul Cammish
Browse files

Update mail/sympl/test.d/tc_exim4.rb

parent 039eb5d9
......@@ -406,7 +406,10 @@ class Exim4ConfigTest < Test::Unit::TestCase
FileUtils.touch(File.join(config_dir, "antivirus"))
sleep 3
# Fairly hacky way to ensure clamAV is up and running - stopping it, starting it and waiting for it to say it's loaded sigs
# deals with an annoying race condition under load testing, where it hasnt finished reading sigs before the tests get to it
system('sync ; date=$(date "+%Y-%m-%d %H:%M") ; systemctl reload clamav-daemon.service ; timeout 120 journalctl -u clamav-daemon.service --since="$date" --follow | while read line ; do echo $line ; if [ $( echo $line | grep -c "[0-9]* signatures" ) -eq 1 ]; then killall "journalctl" ; fi ; done ; sleep 1')
# OK the file is there now, so reject (as per default)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment