aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-02-19 00:07:16 +0000
committerJustin Clark-Casey (justincc)2011-02-19 00:07:16 +0000
commit9d668b09ca893c706745cd2b8fb9b7922b6eeee6 (patch)
tree854085649a14f115c65f96aa17451d645b9a6731 /OpenSim
parentPut some CapabilitiesModule null checks in Scene (diff)
downloadopensim-SC_OLD-9d668b09ca893c706745cd2b8fb9b7922b6eeee6.zip
opensim-SC_OLD-9d668b09ca893c706745cd2b8fb9b7922b6eeee6.tar.gz
opensim-SC_OLD-9d668b09ca893c706745cd2b8fb9b7922b6eeee6.tar.bz2
opensim-SC_OLD-9d668b09ca893c706745cd2b8fb9b7922b6eeee6.tar.xz
remove unused code to share services between scenes in SceneSetupHelpers - this is done differently elsewhere
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs68
1 files changed, 16 insertions, 52 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 9142616..3980c18 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -132,24 +132,11 @@ namespace OpenSim.Tests.Common.Setup
132 public static TestScene SetupScene( 132 public static TestScene SetupScene(
133 string name, UUID id, uint x, uint y, String realServices) 133 string name, UUID id, uint x, uint y, String realServices)
134 { 134 {
135 bool newScene = false;
136
137 Console.WriteLine("Setting up test scene {0}", name); 135 Console.WriteLine("Setting up test scene {0}", name);
138 136
139 // REFACTORING PROBLEM!
140 //// If cm is the same as our last commsManager used, this means the tester wants to link
141 //// regions. In this case, don't use the sameshared region modules and dont initialize them again.
142 //// Also, no need to start another MainServer and MainConsole instance.
143 //if (cm == null || cm != commsManager)
144 //{
145 // System.Console.WriteLine("Starting a brand new scene");
146 // newScene = true;
147 MainConsole.Instance = new MockConsole("TEST PROMPT");
148 // MainServer.Instance = new BaseHttpServer(980);
149 // commsManager = cm;
150 //}
151
152 // We must set up a console otherwise setup of some modules may fail 137 // We must set up a console otherwise setup of some modules may fail
138 MainConsole.Instance = new MockConsole("TEST PROMPT");
139
153 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); 140 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
154 regInfo.RegionName = name; 141 regInfo.RegionName = name;
155 regInfo.RegionID = id; 142 regInfo.RegionID = id;
@@ -164,50 +151,27 @@ namespace OpenSim.Tests.Common.Setup
164 TestScene testScene = new TestScene( 151 TestScene testScene = new TestScene(
165 regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null); 152 regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
166 153
167// INonSharedRegionModule capsModule = new CapabilitiesModule();
168// capsModule.Initialise(new IniConfigSource());
169// testScene.AddRegionModule(capsModule.Name, capsModule);
170// capsModule.AddRegion(testScene);
171
172 IRegionModule godsModule = new GodsModule(); 154 IRegionModule godsModule = new GodsModule();
173 godsModule.Initialise(testScene, new IniConfigSource()); 155 godsModule.Initialise(testScene, new IniConfigSource());
174 testScene.AddModule(godsModule.Name, godsModule); 156 testScene.AddModule(godsModule.Name, godsModule);
175 realServices = realServices.ToLower(); 157 realServices = realServices.ToLower();
176 // IConfigSource config = new IniConfigSource();
177 158
178 // If we have a brand new scene, need to initialize shared region modules 159 if (realServices.Contains("asset"))
179 if ((m_assetService == null && m_inventoryService == null) || newScene) 160 StartAssetService(testScene, true);
180 {
181 if (realServices.Contains("asset"))
182 StartAssetService(testScene, true);
183 else
184 StartAssetService(testScene, false);
185
186 // For now, always started a 'real' authentication service
187 StartAuthenticationService(testScene, true);
188
189 if (realServices.Contains("inventory"))
190 StartInventoryService(testScene, true);
191 else
192 StartInventoryService(testScene, false);
193
194 StartGridService(testScene, true);
195 StartUserAccountService(testScene);
196 StartPresenceService(testScene);
197 }
198 // If not, make sure the shared module gets references to this new scene
199 else 161 else
200 { 162 StartAssetService(testScene, false);
201 m_assetService.AddRegion(testScene);
202 m_assetService.RegionLoaded(testScene);
203 m_inventoryService.AddRegion(testScene);
204 m_inventoryService.RegionLoaded(testScene);
205 m_userAccountService.AddRegion(testScene);
206 m_userAccountService.RegionLoaded(testScene);
207 m_presenceService.AddRegion(testScene);
208 m_presenceService.RegionLoaded(testScene);
209 163
210 } 164 // For now, always started a 'real' authentication service
165 StartAuthenticationService(testScene, true);
166
167 if (realServices.Contains("inventory"))
168 StartInventoryService(testScene, true);
169 else
170 StartInventoryService(testScene, false);
171
172 StartGridService(testScene, true);
173 StartUserAccountService(testScene);
174 StartPresenceService(testScene);
211 175
212 m_inventoryService.PostInitialise(); 176 m_inventoryService.PostInitialise();
213 m_assetService.PostInitialise(); 177 m_assetService.PostInitialise();