From 81bccd6d132956e2de9e5ad473f87931df76cde8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 14 Dec 2010 23:36:34 +0000 Subject: Start implementing a test for 'share with group' object functionality. Not yet complete. While implementing this, a bug was fixed in scene setup helpers where module RegionLoaded() was called immediately after AddRegion() instead of waiting for all AddRegions() to complete. Also, XmlRpcGroupsModule non-message functionality will now work without a message transfer module (as indicated in the comments but with a contradictory implementation) --- OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs | 5 +++-- OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs index aa48754..6fb9df1 100644 --- a/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs +++ b/OpenSim/Tests/Common/Mock/MockGroupsServicesConnector.cs @@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common.Mock [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class MockGroupsServicesConnector : ISharedRegionModule, IGroupsServicesConnector { -// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string Name { @@ -64,6 +64,7 @@ namespace OpenSim.Tests.Common.Mock public void AddRegion(Scene scene) { + m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: Adding to region {0}", scene.RegionInfo.RegionName); scene.RegisterModuleInterface(this); } @@ -174,7 +175,7 @@ namespace OpenSim.Tests.Common.Mock public List GetAgentGroupMemberships(UUID requestingAgentID, UUID AgentID) { - return null; + return new List(); } public List GetAgentGroupRoles(UUID requestingAgentID, UUID AgentID, UUID GroupID) diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 9d7733e..8b16496 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -424,9 +424,12 @@ namespace OpenSim.Tests.Common.Setup foreach (IRegionModuleBase module in newModules) { module.AddRegion(scene); - module.RegionLoaded(scene); scene.AddRegionModule(module.Name, module); } + + // RegionLoaded is fired after all modules have been appropriately added to all scenes + foreach (IRegionModuleBase module in newModules) + module.RegionLoaded(scene); scene.SetModuleInterfaces(); } -- cgit v1.1