diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 7d9f581..6c57e6d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | ||
32 | using log4net.Config; | 33 | using log4net.Config; |
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using NUnit.Framework; | 35 | using NUnit.Framework; |
@@ -38,7 +39,6 @@ using OpenSim.Framework; | |||
38 | using OpenSim.Region.CoreModules.Agent.TextureSender; | 39 | using OpenSim.Region.CoreModules.Agent.TextureSender; |
39 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Tests.Common; | 41 | using OpenSim.Tests.Common; |
41 | using OpenSim.Tests.Common.Mock; | ||
42 | 42 | ||
43 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests | 43 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests |
44 | { | 44 | { |
@@ -53,6 +53,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
53 | [TestFixtureSetUp] | 53 | [TestFixtureSetUp] |
54 | public void FixtureInit() | 54 | public void FixtureInit() |
55 | { | 55 | { |
56 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. | ||
57 | Util.FireAndForgetMethod = FireAndForgetMethod.None; | ||
58 | |||
56 | using ( | 59 | using ( |
57 | Stream resource | 60 | Stream resource |
58 | = GetType().Assembly.GetManifestResourceStream( | 61 | = GetType().Assembly.GetManifestResourceStream( |
@@ -72,9 +75,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
72 | } | 75 | } |
73 | } | 76 | } |
74 | 77 | ||
78 | [TestFixtureTearDown] | ||
79 | public void TearDown() | ||
80 | { | ||
81 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple | ||
82 | // threads. Possibly, later tests should be rewritten not to worry about such things. | ||
83 | Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; | ||
84 | } | ||
85 | |||
75 | [SetUp] | 86 | [SetUp] |
76 | public void SetUp() | 87 | public override void SetUp() |
77 | { | 88 | { |
89 | base.SetUp(); | ||
90 | |||
78 | UUID userId = TestHelpers.ParseTail(0x3); | 91 | UUID userId = TestHelpers.ParseTail(0x3); |
79 | 92 | ||
80 | J2KDecoderModule j2kdm = new J2KDecoderModule(); | 93 | J2KDecoderModule j2kdm = new J2KDecoderModule(); |