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

user_profiles
Justin Clark-Casey (justincc) 2013-02-07 00:54:09 +00:00
parent c8c5d74c22
commit 4d1758985f
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()
{