diff options
author | Justin Clark-Casey (justincc) | 2010-03-12 19:31:14 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-03-12 19:31:14 +0000 |
commit | f2de50bb14bd8215ea98c79c79aabe1e6b4f2780 (patch) | |
tree | a234ef918308290b8d9db829f392ce646b7f2c06 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-f2de50bb14bd8215ea98c79c79aabe1e6b4f2780.zip opensim-SC_OLD-f2de50bb14bd8215ea98c79c79aabe1e6b4f2780.tar.gz opensim-SC_OLD-f2de50bb14bd8215ea98c79c79aabe1e6b4f2780.tar.bz2 opensim-SC_OLD-f2de50bb14bd8215ea98c79c79aabe1e6b4f2780.tar.xz |
Fix tests broken in 88771aeed3d45e60a18aa9a810eeb37b8e5def12
Adds MockUserAccountService and connects it up
Stops services being carried over between tests since this leads to hard to find bugs
Improves information and error reporting when loading plugins
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | 13 |
2 files changed, 13 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index ce0ca40..30ebb21 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | |||
@@ -73,33 +73,31 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
73 | IConfig userConfig = source.Configs["UserAccountService"]; | 73 | IConfig userConfig = source.Configs["UserAccountService"]; |
74 | if (userConfig == null) | 74 | if (userConfig == null) |
75 | { | 75 | { |
76 | m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpenSim.ini"); | 76 | m_log.Error("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: UserAccountService missing from OpenSim.ini"); |
77 | return; | 77 | return; |
78 | } | 78 | } |
79 | 79 | ||
80 | string serviceDll = userConfig.GetString("LocalServiceModule", | 80 | string serviceDll = userConfig.GetString("LocalServiceModule", String.Empty); |
81 | String.Empty); | ||
82 | 81 | ||
83 | if (serviceDll == String.Empty) | 82 | if (serviceDll == String.Empty) |
84 | { | 83 | { |
85 | m_log.Error("[USER CONNECTOR]: No LocalServiceModule named in section UserService"); | 84 | m_log.Error("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: No LocalServiceModule named in section UserService"); |
86 | return; | 85 | return; |
87 | } | 86 | } |
88 | 87 | ||
89 | Object[] args = new Object[] { source }; | 88 | Object[] args = new Object[] { source }; |
90 | m_UserService = | 89 | m_UserService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args); |
91 | ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, | ||
92 | args); | ||
93 | 90 | ||
94 | if (m_UserService == null) | 91 | if (m_UserService == null) |
95 | { | 92 | { |
96 | m_log.Error("[USER CONNECTOR]: Can't load user account service"); | 93 | m_log.ErrorFormat( |
94 | "[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll); | ||
97 | return; | 95 | return; |
98 | } | 96 | } |
99 | m_Enabled = true; | 97 | m_Enabled = true; |
100 | m_Cache = new UserAccountCache(); | 98 | m_Cache = new UserAccountCache(); |
101 | 99 | ||
102 | m_log.Info("[USER CONNECTOR]: Local user connector enabled"); | 100 | m_log.Info("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Local user connector enabled"); |
103 | } | 101 | } |
104 | } | 102 | } |
105 | } | 103 | } |
@@ -134,6 +132,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
134 | { | 132 | { |
135 | if (!m_Enabled) | 133 | if (!m_Enabled) |
136 | return; | 134 | return; |
135 | |||
136 | m_log.InfoFormat("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Enabled local user accounts for region {0}", scene.RegionInfo.RegionName); | ||
137 | } | 137 | } |
138 | 138 | ||
139 | #endregion | 139 | #endregion |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index b50d4ca..78f2ae3 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -86,6 +86,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
86 | public void TestDeleteSceneObjectAsync() | 86 | public void TestDeleteSceneObjectAsync() |
87 | { | 87 | { |
88 | TestHelper.InMethod(); | 88 | TestHelper.InMethod(); |
89 | //log4net.Config.XmlConfigurator.Configure(); | ||
89 | 90 | ||
90 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); | 91 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); |
91 | 92 | ||
@@ -97,15 +98,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
97 | 98 | ||
98 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); | 99 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); |
99 | 100 | ||
100 | try | 101 | IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); |
101 | { | 102 | scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero); |
102 | IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); | 103 | |
103 | scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero); | ||
104 | } | ||
105 | catch (Exception e) | ||
106 | { | ||
107 | Console.WriteLine("Exception: " + e.StackTrace); | ||
108 | } | ||
109 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 104 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
110 | 105 | ||
111 | Assert.That(retrievedPart, Is.Not.Null); | 106 | Assert.That(retrievedPart, Is.Not.Null); |