diff options
author | Diva Canto | 2010-01-11 07:45:47 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-11 07:45:47 -0800 |
commit | 001d3695683d9511446d194feeb763c437170028 (patch) | |
tree | 037954a2227cfd5551ddbd9e1d3b1271284c151f /OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |
parent | Remove CreateCommsManagerPlugin (diff) | |
download | opensim-SC_OLD-001d3695683d9511446d194feeb763c437170028.zip opensim-SC_OLD-001d3695683d9511446d194feeb763c437170028.tar.gz opensim-SC_OLD-001d3695683d9511446d194feeb763c437170028.tar.bz2 opensim-SC_OLD-001d3695683d9511446d194feeb763c437170028.tar.xz |
CommunicationsManager deleted.
Diffstat (limited to 'OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 64 |
1 files changed, 33 insertions, 31 deletions
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 | |||
60 | private static ISharedRegionModule m_assetService = null; | 60 | private static ISharedRegionModule m_assetService = null; |
61 | private static ISharedRegionModule m_inventoryService = null; | 61 | private static ISharedRegionModule m_inventoryService = null; |
62 | private static ISharedRegionModule m_gridService = null; | 62 | private static ISharedRegionModule m_gridService = null; |
63 | private static TestCommunicationsManager commsManager = null; | ||
64 | 63 | ||
65 | /// <summary> | 64 | /// <summary> |
66 | /// Set up a test scene | 65 | /// Set up a test scene |
@@ -83,21 +82,23 @@ namespace OpenSim.Tests.Common.Setup | |||
83 | public static TestScene SetupScene(String realServices) | 82 | public static TestScene SetupScene(String realServices) |
84 | { | 83 | { |
85 | return SetupScene( | 84 | return SetupScene( |
86 | "Unit test region", UUID.Random(), 1000, 1000, new TestCommunicationsManager(), realServices); | 85 | "Unit test region", UUID.Random(), 1000, 1000, realServices); |
87 | } | 86 | } |
88 | 87 | ||
89 | /// <summary> | 88 | // REFACTORING PROBLEM. No idea what the difference is with the previous one |
90 | /// Set up a test scene | 89 | ///// <summary> |
91 | /// </summary> | 90 | ///// Set up a test scene |
92 | /// | 91 | ///// </summary> |
93 | /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> | 92 | ///// |
94 | /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> | 93 | ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> |
95 | /// <returns></returns> | 94 | ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param> |
96 | public static TestScene SetupScene(TestCommunicationsManager cm, String realServices) | 95 | ///// <returns></returns> |
97 | { | 96 | //public static TestScene SetupScene(String realServices) |
98 | return SetupScene( | 97 | //{ |
99 | "Unit test region", UUID.Random(), 1000, 1000, cm, ""); | 98 | // return SetupScene( |
100 | } | 99 | // "Unit test region", UUID.Random(), 1000, 1000, ""); |
100 | //} | ||
101 | |||
101 | /// <summary> | 102 | /// <summary> |
102 | /// Set up a test scene | 103 | /// Set up a test scene |
103 | /// </summary> | 104 | /// </summary> |
@@ -107,9 +108,9 @@ namespace OpenSim.Tests.Common.Setup | |||
107 | /// <param name="y">Y co-ordinate of the region</param> | 108 | /// <param name="y">Y co-ordinate of the region</param> |
108 | /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> | 109 | /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> |
109 | /// <returns></returns> | 110 | /// <returns></returns> |
110 | public static TestScene SetupScene(string name, UUID id, uint x, uint y, TestCommunicationsManager cm) | 111 | public static TestScene SetupScene(string name, UUID id, uint x, uint y) |
111 | { | 112 | { |
112 | return SetupScene(name, id, x, y, cm, ""); | 113 | return SetupScene(name, id, x, y,""); |
113 | } | 114 | } |
114 | 115 | ||
115 | 116 | ||
@@ -125,23 +126,24 @@ namespace OpenSim.Tests.Common.Setup | |||
125 | /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> | 126 | /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> |
126 | /// <returns></returns> | 127 | /// <returns></returns> |
127 | public static TestScene SetupScene( | 128 | public static TestScene SetupScene( |
128 | string name, UUID id, uint x, uint y, TestCommunicationsManager cm, String realServices) | 129 | string name, UUID id, uint x, uint y, String realServices) |
129 | { | 130 | { |
130 | bool newScene = false; | 131 | bool newScene = false; |
131 | 132 | ||
132 | Console.WriteLine("Setting up test scene {0}", name); | 133 | Console.WriteLine("Setting up test scene {0}", name); |
133 | 134 | ||
134 | // If cm is the same as our last commsManager used, this means the tester wants to link | 135 | // REFACTORING PROBLEM! |
135 | // regions. In this case, don't use the sameshared region modules and dont initialize them again. | 136 | //// If cm is the same as our last commsManager used, this means the tester wants to link |
136 | // Also, no need to start another MainServer and MainConsole instance. | 137 | //// regions. In this case, don't use the sameshared region modules and dont initialize them again. |
137 | if (cm == null || cm != commsManager) | 138 | //// Also, no need to start another MainServer and MainConsole instance. |
138 | { | 139 | //if (cm == null || cm != commsManager) |
139 | System.Console.WriteLine("Starting a brand new scene"); | 140 | //{ |
140 | newScene = true; | 141 | // System.Console.WriteLine("Starting a brand new scene"); |
141 | MainConsole.Instance = new LocalConsole("TEST PROMPT"); | 142 | // newScene = true; |
142 | MainServer.Instance = new BaseHttpServer(980); | 143 | // MainConsole.Instance = new LocalConsole("TEST PROMPT"); |
143 | commsManager = cm; | 144 | // MainServer.Instance = new BaseHttpServer(980); |
144 | } | 145 | // commsManager = cm; |
146 | //} | ||
145 | 147 | ||
146 | // We must set up a console otherwise setup of some modules may fail | 148 | // We must set up a console otherwise setup of some modules may fail |
147 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); | 149 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); |
@@ -149,13 +151,13 @@ namespace OpenSim.Tests.Common.Setup | |||
149 | regInfo.RegionID = id; | 151 | regInfo.RegionID = id; |
150 | 152 | ||
151 | AgentCircuitManager acm = new AgentCircuitManager(); | 153 | AgentCircuitManager acm = new AgentCircuitManager(); |
152 | SceneCommunicationService scs = new SceneCommunicationService(cm); | 154 | SceneCommunicationService scs = new SceneCommunicationService(); |
153 | 155 | ||
154 | StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); | 156 | StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); |
155 | IConfigSource configSource = new IniConfigSource(); | 157 | IConfigSource configSource = new IniConfigSource(); |
156 | 158 | ||
157 | TestScene testScene = new TestScene( | 159 | TestScene testScene = new TestScene( |
158 | regInfo, acm, cm, scs, sm, null, false, false, false, configSource, null); | 160 | regInfo, acm, scs, sm, null, false, false, false, configSource, null); |
159 | 161 | ||
160 | INonSharedRegionModule capsModule = new CapabilitiesModule(); | 162 | INonSharedRegionModule capsModule = new CapabilitiesModule(); |
161 | capsModule.Initialise(new IniConfigSource()); | 163 | capsModule.Initialise(new IniConfigSource()); |