remove unused code to share services between scenes in SceneSetupHelpers - this is done differently elsewhere
parent
60fe3d48ee
commit
9d668b09ca
|
@ -132,24 +132,11 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
public static TestScene SetupScene(
|
public static TestScene SetupScene(
|
||||||
string name, UUID id, uint x, uint y, String realServices)
|
string name, UUID id, uint x, uint y, String realServices)
|
||||||
{
|
{
|
||||||
bool newScene = false;
|
|
||||||
|
|
||||||
Console.WriteLine("Setting up test scene {0}", name);
|
Console.WriteLine("Setting up test scene {0}", name);
|
||||||
|
|
||||||
// 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 MockConsole("TEST PROMPT");
|
|
||||||
// MainServer.Instance = new BaseHttpServer(980);
|
|
||||||
// commsManager = cm;
|
|
||||||
//}
|
|
||||||
|
|
||||||
// We must set up a console otherwise setup of some modules may fail
|
// We must set up a console otherwise setup of some modules may fail
|
||||||
|
MainConsole.Instance = new MockConsole("TEST PROMPT");
|
||||||
|
|
||||||
RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
|
RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
|
||||||
regInfo.RegionName = name;
|
regInfo.RegionName = name;
|
||||||
regInfo.RegionID = id;
|
regInfo.RegionID = id;
|
||||||
|
@ -164,50 +151,27 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
TestScene testScene = new TestScene(
|
TestScene testScene = new TestScene(
|
||||||
regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
|
regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null);
|
||||||
|
|
||||||
// INonSharedRegionModule capsModule = new CapabilitiesModule();
|
|
||||||
// capsModule.Initialise(new IniConfigSource());
|
|
||||||
// testScene.AddRegionModule(capsModule.Name, capsModule);
|
|
||||||
// capsModule.AddRegion(testScene);
|
|
||||||
|
|
||||||
IRegionModule godsModule = new GodsModule();
|
IRegionModule godsModule = new GodsModule();
|
||||||
godsModule.Initialise(testScene, new IniConfigSource());
|
godsModule.Initialise(testScene, new IniConfigSource());
|
||||||
testScene.AddModule(godsModule.Name, godsModule);
|
testScene.AddModule(godsModule.Name, godsModule);
|
||||||
realServices = realServices.ToLower();
|
realServices = realServices.ToLower();
|
||||||
// IConfigSource config = new IniConfigSource();
|
|
||||||
|
|
||||||
// If we have a brand new scene, need to initialize shared region modules
|
if (realServices.Contains("asset"))
|
||||||
if ((m_assetService == null && m_inventoryService == null) || newScene)
|
StartAssetService(testScene, true);
|
||||||
{
|
|
||||||
if (realServices.Contains("asset"))
|
|
||||||
StartAssetService(testScene, true);
|
|
||||||
else
|
|
||||||
StartAssetService(testScene, false);
|
|
||||||
|
|
||||||
// For now, always started a 'real' authentication service
|
|
||||||
StartAuthenticationService(testScene, true);
|
|
||||||
|
|
||||||
if (realServices.Contains("inventory"))
|
|
||||||
StartInventoryService(testScene, true);
|
|
||||||
else
|
|
||||||
StartInventoryService(testScene, false);
|
|
||||||
|
|
||||||
StartGridService(testScene, true);
|
|
||||||
StartUserAccountService(testScene);
|
|
||||||
StartPresenceService(testScene);
|
|
||||||
}
|
|
||||||
// If not, make sure the shared module gets references to this new scene
|
|
||||||
else
|
else
|
||||||
{
|
StartAssetService(testScene, false);
|
||||||
m_assetService.AddRegion(testScene);
|
|
||||||
m_assetService.RegionLoaded(testScene);
|
|
||||||
m_inventoryService.AddRegion(testScene);
|
|
||||||
m_inventoryService.RegionLoaded(testScene);
|
|
||||||
m_userAccountService.AddRegion(testScene);
|
|
||||||
m_userAccountService.RegionLoaded(testScene);
|
|
||||||
m_presenceService.AddRegion(testScene);
|
|
||||||
m_presenceService.RegionLoaded(testScene);
|
|
||||||
|
|
||||||
}
|
// For now, always started a 'real' authentication service
|
||||||
|
StartAuthenticationService(testScene, true);
|
||||||
|
|
||||||
|
if (realServices.Contains("inventory"))
|
||||||
|
StartInventoryService(testScene, true);
|
||||||
|
else
|
||||||
|
StartInventoryService(testScene, false);
|
||||||
|
|
||||||
|
StartGridService(testScene, true);
|
||||||
|
StartUserAccountService(testScene);
|
||||||
|
StartPresenceService(testScene);
|
||||||
|
|
||||||
m_inventoryService.PostInitialise();
|
m_inventoryService.PostInitialise();
|
||||||
m_assetService.PostInitialise();
|
m_assetService.PostInitialise();
|
||||||
|
|
Loading…
Reference in New Issue