From 967d42d393a48841dd0f6e4e1173f77cfaa3c5e6 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 19 Sep 2012 01:06:42 +0100 Subject: [PATCH] Correctly override and call base OpenSimTestCase.SetUp() method in GridConnectorsTests and ArchiverTests. Remove unrelated compile warning from AttachmentsModuleTests. --- .../Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 4 ++-- .../Grid/Tests/GridConnectorsTests.cs | 8 +++++--- .../CoreModules/World/Archiver/Tests/ArchiverTests.cs | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 82c63901f6..51e10f5111 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs @@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests public class AttachmentsModuleTests : OpenSimTestCase { private AutoResetEvent m_chatEvent = new AutoResetEvent(false); - private OSChatMessage m_osChatMessageReceived; +// private OSChatMessage m_osChatMessageReceived; [TestFixtureSetUp] public void FixtureInit() @@ -83,7 +83,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests { // Console.WriteLine("Got chat [{0}]", oscm.Message); - m_osChatMessageReceived = oscm; +// m_osChatMessageReceived = oscm; m_chatEvent.Set(); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index 57ae5497ee..43381337c7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs @@ -46,8 +46,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests public class GridConnectorsTests : OpenSimTestCase { LocalGridServicesConnector m_LocalConnector; - private void SetUp() + + [SetUp] + public override void SetUp() { + base.SetUp(); + IConfigSource config = new IniConfigSource(); config.AddConfig("Modules"); config.AddConfig("GridService"); @@ -71,8 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests TestHelpers.InMethod(); // log4net.Config.XmlConfigurator.Configure(); - SetUp(); - // Create 4 regions GridRegion r1 = new GridRegion(); r1.RegionName = "Test Region 1"; diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 0a309057e7..82f49b0dfa 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -65,8 +65,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests protected TaskInventoryItem m_soundItem; [SetUp] - public void SetUp() + public override void SetUp() { + base.SetUp(); + + // FIXME: Do something about this - relying on statics in unit tests causes trouble sooner or later new SceneManager(); m_archiverModule = new ArchiverModule();