From 96a3b68086c44dfe35018cc1eaf20be5cba1b0b1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Sep 2011 20:59:52 +0100 Subject: Remember to set and unset the fire and forget method at the top of the attachment and npc tests --- .../Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World') diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 3bd43b4..018cf88 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -50,13 +50,21 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests [TestFixture] public class NPCModuleTests { - [SetUp] - public void Init() + [TestFixtureSetUp] + public void FixtureInit() { // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. 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] public void TestCreate() { -- cgit v1.1