From 6f077d5e5f9929f6593850dc096983dcf237e387 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 26 Aug 2009 21:05:46 -0400 Subject: * Another attempt at fixing the random spurious test error. * This time it might be the listening socket thread from HttpServer aborting with a non blocking thread abort exception. Hopefully calling Stop() on MainServer.Instance will solve that. --- OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | 6 ++++++ .../Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs | 11 +++++++++++ 2 files changed, 17 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs index 3ee6007..8cd1d55 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs @@ -378,6 +378,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects"); } + [TearDown] + public void TearDown() + { + if (MainServer.Instance != null) MainServer.Instance.Stop(); + } + public static string GetRandomCapsObjectPath() { TestHelper.InMethod(); diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs index 23eab90..1d460dd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs @@ -78,6 +78,17 @@ namespace OpenSim.Region.Framework.Scenes.Tests // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); } + [TearDown] + public void TearDown() + { + try + { + if (MainServer.Instance != null) MainServer.Instance.Stop(); + } + catch (NullReferenceException) + { } + } + } public class ThreadRunResults -- cgit v1.1