From a60ed0562ca403b5881e221ccbdd8366ff053a27 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 28 Sep 2009 17:42:35 -0700 Subject: [PATCH] I think I have fixed something that was broken in the scene setup (tests) and that needs to be reflected in all other services setups. But the teleport test still doesn't work. Commenting it for now. --- .../Scenes/Tests/StandaloneTeleportTests.cs | 7 ++++--- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 17 ++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs index 1dc16274ad..751c1cd16e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs @@ -118,14 +118,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests // shared module ISharedRegionModule interregionComms = new RESTInterregionComms(); - Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, cm, "grid"); - SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms); - sceneA.RegisterRegionWithGrid(); Scene sceneB = SceneSetupHelpers.SetupScene("sceneB", sceneBId, 1010, 1010, cm, "grid"); SceneSetupHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms); sceneB.RegisterRegionWithGrid(); + Scene sceneA = SceneSetupHelpers.SetupScene("sceneA", sceneAId, 1000, 1000, cm, "grid"); + SceneSetupHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms); + sceneA.RegisterRegionWithGrid(); + UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); TestClient client = SceneSetupHelpers.AddRootAgent(sceneA, agentId); diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 95f5e3ce58..53f24d9207 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -249,21 +249,24 @@ namespace OpenSim.Tests.Common.Setup private static void StartGridService(Scene testScene, bool real) { - ISharedRegionModule gridService = new LocalGridServicesConnector(); IConfigSource config = new IniConfigSource(); config.AddConfig("Modules"); config.AddConfig("GridService"); config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); + config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData"); if (real) config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); + if (m_gridService == null) + { + ISharedRegionModule gridService = new LocalGridServicesConnector(); + gridService.Initialise(config); + m_gridService = gridService; + } //else // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService"); - config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData"); - gridService.Initialise(config); - gridService.AddRegion(testScene); - gridService.RegionLoaded(testScene); - testScene.AddRegionModule(gridService.Name, gridService); - m_gridService = gridService; + m_gridService.AddRegion(testScene); + m_gridService.RegionLoaded(testScene); + //testScene.AddRegionModule(m_gridService.Name, m_gridService); }