Remember to set and unset the fire and forget method at the top of the attachment and npc tests
parent
bd5d2cb043
commit
96a3b68086
|
@ -58,12 +58,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||||
private AttachmentsModule m_attMod;
|
private AttachmentsModule m_attMod;
|
||||||
private ScenePresence m_presence;
|
private ScenePresence m_presence;
|
||||||
|
|
||||||
[SetUp]
|
[TestFixtureSetUp]
|
||||||
public void Init()
|
public void FixtureInit()
|
||||||
{
|
{
|
||||||
// Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
|
// Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
|
||||||
Util.FireAndForgetMethod = FireAndForgetMethod.None;
|
Util.FireAndForgetMethod = FireAndForgetMethod.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
IConfigSource config = new IniConfigSource();
|
IConfigSource config = new IniConfigSource();
|
||||||
config.AddConfig("Modules");
|
config.AddConfig("Modules");
|
||||||
config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule");
|
config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule");
|
||||||
|
@ -73,7 +77,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
||||||
SceneHelpers.SetupSceneModules(scene, config, m_attMod, new BasicInventoryAccessModule());
|
SceneHelpers.SetupSceneModules(scene, config, m_attMod, new BasicInventoryAccessModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
[TearDown]
|
[TestFixtureTearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
// We must set this back afterwards, otherwise later tests will fail since they're expecting multiple
|
// We must set this back afterwards, otherwise later tests will fail since they're expecting multiple
|
||||||
|
|
|
@ -50,13 +50,21 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class NPCModuleTests
|
public class NPCModuleTests
|
||||||
{
|
{
|
||||||
[SetUp]
|
[TestFixtureSetUp]
|
||||||
public void Init()
|
public void FixtureInit()
|
||||||
{
|
{
|
||||||
// Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
|
// Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
|
||||||
Util.FireAndForgetMethod = FireAndForgetMethod.None;
|
Util.FireAndForgetMethod = FireAndForgetMethod.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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 not to worry about such things.
|
||||||
|
Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod;
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestCreate()
|
public void TestCreate()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue