From 001d3695683d9511446d194feeb763c437170028 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 07:45:47 -0800 Subject: CommunicationsManager deleted. --- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 64 +++++++++++++------------ 1 file changed, 33 insertions(+), 31 deletions(-) (limited to 'OpenSim/Tests/Common/Setup') diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index dbb8fd4..f6c9f3b 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -60,7 +60,6 @@ namespace OpenSim.Tests.Common.Setup private static ISharedRegionModule m_assetService = null; private static ISharedRegionModule m_inventoryService = null; private static ISharedRegionModule m_gridService = null; - private static TestCommunicationsManager commsManager = null; /// /// Set up a test scene @@ -83,21 +82,23 @@ namespace OpenSim.Tests.Common.Setup public static TestScene SetupScene(String realServices) { return SetupScene( - "Unit test region", UUID.Random(), 1000, 1000, new TestCommunicationsManager(), realServices); + "Unit test region", UUID.Random(), 1000, 1000, realServices); } - /// - /// Set up a test scene - /// - /// - /// Starts real inventory and asset services, as opposed to mock ones, if true - /// This should be the same if simulating two scenes within a standalone - /// - public static TestScene SetupScene(TestCommunicationsManager cm, String realServices) - { - return SetupScene( - "Unit test region", UUID.Random(), 1000, 1000, cm, ""); - } + // REFACTORING PROBLEM. No idea what the difference is with the previous one + ///// + ///// Set up a test scene + ///// + ///// + ///// Starts real inventory and asset services, as opposed to mock ones, if true + ///// This should be the same if simulating two scenes within a standalone + ///// + //public static TestScene SetupScene(String realServices) + //{ + // return SetupScene( + // "Unit test region", UUID.Random(), 1000, 1000, ""); + //} + /// /// Set up a test scene /// @@ -107,9 +108,9 @@ namespace OpenSim.Tests.Common.Setup /// Y co-ordinate of the region /// This should be the same if simulating two scenes within a standalone /// - public static TestScene SetupScene(string name, UUID id, uint x, uint y, TestCommunicationsManager cm) + public static TestScene SetupScene(string name, UUID id, uint x, uint y) { - return SetupScene(name, id, x, y, cm, ""); + return SetupScene(name, id, x, y,""); } @@ -125,23 +126,24 @@ namespace OpenSim.Tests.Common.Setup /// Starts real inventory and asset services, as opposed to mock ones, if true /// public static TestScene SetupScene( - string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices) + string name, UUID id, uint x, uint y, String realServices) { bool newScene = false; Console.WriteLine("Setting up test scene {0}", name); - - // If cm is the same as our last commsManager used, this means the tester wants to link - // regions. In this case, don't use the sameshared region modules and dont initialize them again. - // Also, no need to start another MainServer and MainConsole instance. - if (cm == null || cm != commsManager) - { - System.Console.WriteLine("Starting a brand new scene"); - newScene = true; - MainConsole.Instance = new LocalConsole("TEST PROMPT"); - MainServer.Instance = new BaseHttpServer(980); - commsManager = cm; - } + + // REFACTORING PROBLEM! + //// If cm is the same as our last commsManager used, this means the tester wants to link + //// regions. In this case, don't use the sameshared region modules and dont initialize them again. + //// Also, no need to start another MainServer and MainConsole instance. + //if (cm == null || cm != commsManager) + //{ + // System.Console.WriteLine("Starting a brand new scene"); + // newScene = true; + // MainConsole.Instance = new LocalConsole("TEST PROMPT"); + // MainServer.Instance = new BaseHttpServer(980); + // commsManager = cm; + //} // We must set up a console otherwise setup of some modules may fail RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); @@ -149,13 +151,13 @@ namespace OpenSim.Tests.Common.Setup regInfo.RegionID = id; AgentCircuitManager acm = new AgentCircuitManager(); - SceneCommunicationService scs = new SceneCommunicationService(cm); + SceneCommunicationService scs = new SceneCommunicationService(); StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); IConfigSource configSource = new IniConfigSource(); TestScene testScene = new TestScene( - regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null); + regInfo, acm, scs, sm, null, false, false, false, configSource, null); INonSharedRegionModule capsModule = new CapabilitiesModule(); capsModule.Initialise(new IniConfigSource()); -- cgit v1.1