Make json store tests operate on a single thread to ensure we don't run into any race related test failures in the future.

0.7.4-extended
Justin Clark-Casey (justincc) 2013-02-07 00:54:09 +00:00
parent 251a70338a
commit fb2de29f77
1 changed files with 16 additions and 0 deletions

View File

@ -54,6 +54,22 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
private MockScriptEngine m_engine;
private ScriptModuleCommsModule m_smcm;
[TestFixtureSetUp]
public void FixtureInit()
{
// Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest;
}
[TestFixtureTearDown]
public void TearDown()
{
// We must set this back afterwards, otherwise later tests will fail since they're expecting multiple
// threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression
// tests really shouldn't).
Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod;
}
[SetUp]
public override void SetUp()
{