From a10093b620a1dab8d7955b43ac237c40ecfa9bcf Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 5 Sep 2012 16:20:34 -0500 Subject: [PATCH] Add sleeps to configuration_update test for better reliability. Not the greatest solution, but makes the 3 bro processes more likely to run sequentially so that the controller2 process doesn't happen to be scheduled before the controller process. In that case, the controllee gets the shutdown request before the configuration update. FreeBSD especially seemed to schedule them the unintended way frequently. --- .../scripts/base/frameworks/control/configuration_update.bro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/btest/scripts/base/frameworks/control/configuration_update.bro b/testing/btest/scripts/base/frameworks/control/configuration_update.bro index 920a162503..d9e62efe08 100644 --- a/testing/btest/scripts/base/frameworks/control/configuration_update.bro +++ b/testing/btest/scripts/base/frameworks/control/configuration_update.bro @@ -1,7 +1,9 @@ # @TEST-SERIALIZE: comm # # @TEST-EXEC: btest-bg-run controllee BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controllee Communication::listen_port=65531/tcp +# @TEST-EXEC: sleep 5 # @TEST-EXEC: btest-bg-run controller BROPATH=$BROPATH:.. bro %INPUT test-redef frameworks/control/controller Control::host=127.0.0.1 Control::host_port=65531/tcp Control::cmd=configuration_update +# @TEST-EXEC: sleep 5 # @TEST-EXEC: btest-bg-run controller2 BROPATH=$BROPATH:.. bro %INPUT frameworks/control/controller Control::host=127.0.0.1 Control::host_port=65531/tcp Control::cmd=shutdown # @TEST-EXEC: btest-bg-wait 10 # @TEST-EXEC: btest-diff controllee/.stdout