diff options
author | Justin Clark-Casey (justincc) | 2011-09-08 20:59:52 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-08 20:59:52 +0100 |
commit | 96a3b68086c44dfe35018cc1eaf20be5cba1b0b1 (patch) | |
tree | 351be03301b4acd1522289cd02aae612cf1daa5c /OpenSim/Region | |
parent | Use scene presence agent id for rezzed object ownership rather than item owner. (diff) | |
download | opensim-SC-96a3b68086c44dfe35018cc1eaf20be5cba1b0b1.zip opensim-SC-96a3b68086c44dfe35018cc1eaf20be5cba1b0b1.tar.gz opensim-SC-96a3b68086c44dfe35018cc1eaf20be5cba1b0b1.tar.bz2 opensim-SC-96a3b68086c44dfe35018cc1eaf20be5cba1b0b1.tar.xz |
Remember to set and unset the fire and forget method at the top of the attachment and npc tests
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 12 |
2 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 0fa2e00..35183b3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -58,12 +58,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
58 | private AttachmentsModule m_attMod; | 58 | private AttachmentsModule m_attMod; |
59 | private ScenePresence m_presence; | 59 | private ScenePresence m_presence; |
60 | 60 | ||
61 | [SetUp] | 61 | [TestFixtureSetUp] |
62 | public void Init() | 62 | public void FixtureInit() |
63 | { | 63 | { |
64 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. | 64 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. |
65 | Util.FireAndForgetMethod = FireAndForgetMethod.None; | 65 | Util.FireAndForgetMethod = FireAndForgetMethod.None; |
66 | } | ||
66 | 67 | ||
68 | [SetUp] | ||
69 | public void Init() | ||
70 | { | ||
67 | IConfigSource config = new IniConfigSource(); | 71 | IConfigSource config = new IniConfigSource(); |
68 | config.AddConfig("Modules"); | 72 | config.AddConfig("Modules"); |
69 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 73 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
@@ -73,7 +77,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
73 | SceneHelpers.SetupSceneModules(scene, config, m_attMod, new BasicInventoryAccessModule()); | 77 | SceneHelpers.SetupSceneModules(scene, config, m_attMod, new BasicInventoryAccessModule()); |
74 | } | 78 | } |
75 | 79 | ||
76 | [TearDown] | 80 | [TestFixtureTearDown] |
77 | public void TearDown() | 81 | public void TearDown() |
78 | { | 82 | { |
79 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple | 83 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple |
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 | |||
50 | [TestFixture] | 50 | [TestFixture] |
51 | public class NPCModuleTests | 51 | public class NPCModuleTests |
52 | { | 52 | { |
53 | [SetUp] | 53 | [TestFixtureSetUp] |
54 | public void Init() | 54 | public void FixtureInit() |
55 | { | 55 | { |
56 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. | 56 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. |
57 | Util.FireAndForgetMethod = FireAndForgetMethod.None; | 57 | Util.FireAndForgetMethod = FireAndForgetMethod.None; |
58 | } | 58 | } |
59 | 59 | ||
60 | [TestFixtureTearDown] | ||
61 | public void TearDown() | ||
62 | { | ||
63 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple | ||
64 | // threads. Possibly, later tests should be rewritten not to worry about such things. | ||
65 | Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; | ||
66 | } | ||
67 | |||
60 | [Test] | 68 | [Test] |
61 | public void TestCreate() | 69 | public void TestCreate() |
62 | { | 70 | { |