diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 7d9f581..575e54c 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; |
@@ -53,6 +54,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
53 | [TestFixtureSetUp] | 54 | [TestFixtureSetUp] |
54 | public void FixtureInit() | 55 | public void FixtureInit() |
55 | { | 56 | { |
57 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. | ||
58 | Util.FireAndForgetMethod = FireAndForgetMethod.None; | ||
59 | |||
56 | using ( | 60 | using ( |
57 | Stream resource | 61 | Stream resource |
58 | = GetType().Assembly.GetManifestResourceStream( | 62 | = GetType().Assembly.GetManifestResourceStream( |
@@ -72,9 +76,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
72 | } | 76 | } |
73 | } | 77 | } |
74 | 78 | ||
79 | [TestFixtureTearDown] | ||
80 | public void TearDown() | ||
81 | { | ||
82 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple | ||
83 | // threads. Possibly, later tests should be rewritten not to worry about such things. | ||
84 | Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; | ||
85 | } | ||
86 | |||
75 | [SetUp] | 87 | [SetUp] |
76 | public void SetUp() | 88 | public override void SetUp() |
77 | { | 89 | { |
90 | base.SetUp(); | ||
91 | |||
78 | UUID userId = TestHelpers.ParseTail(0x3); | 92 | UUID userId = TestHelpers.ParseTail(0x3); |
79 | 93 | ||
80 | J2KDecoderModule j2kdm = new J2KDecoderModule(); | 94 | J2KDecoderModule j2kdm = new J2KDecoderModule(); |