diff options
author | Sean Dague | 2009-05-07 19:07:08 +0000 |
---|---|---|
committer | Sean Dague | 2009-05-07 19:07:08 +0000 |
commit | ce0a84cbc0e277dd5be08a20febf13364a985a3a (patch) | |
tree | d5fc2dda5eaf3674c67d82198efd04323f1ba7a5 /OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |
parent | RemoteAdminPlugin was using a mixture of both "true"/"false" and 0/1 (diff) | |
download | opensim-SC-ce0a84cbc0e277dd5be08a20febf13364a985a3a.zip opensim-SC-ce0a84cbc0e277dd5be08a20febf13364a985a3a.tar.gz opensim-SC-ce0a84cbc0e277dd5be08a20febf13364a985a3a.tar.bz2 opensim-SC-ce0a84cbc0e277dd5be08a20febf13364a985a3a.tar.xz |
instrument most of the tests with a new InMethod function that may help us figure
out where that pesky deadlock is during test runs.
Diffstat (limited to 'OpenSim/Framework/Communications/Tests/LoginServiceTests.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 965e6b4..7d75faa 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Framework.Communications.Services; | |||
38 | using OpenSim.Region.Communications.Local; | 38 | using OpenSim.Region.Communications.Local; |
39 | using OpenSim.Tests.Common.Mock; | 39 | using OpenSim.Tests.Common.Mock; |
40 | using OpenSim.Client.Linden; | 40 | using OpenSim.Client.Linden; |
41 | using OpenSim.Tests.Common; | ||
41 | 42 | ||
42 | namespace OpenSim.Framework.Communications.Tests | 43 | namespace OpenSim.Framework.Communications.Tests |
43 | { | 44 | { |
@@ -45,6 +46,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
45 | /// Test the login service. For now, most of this will be done through the LocalLoginService as LoginService | 46 | /// Test the login service. For now, most of this will be done through the LocalLoginService as LoginService |
46 | /// is abstract | 47 | /// is abstract |
47 | /// </summary> | 48 | /// </summary> |
49 | |||
48 | [TestFixture] | 50 | [TestFixture] |
49 | public class LoginServiceTests | 51 | public class LoginServiceTests |
50 | { | 52 | { |
@@ -83,6 +85,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
83 | [Test] | 85 | [Test] |
84 | public void T010_TestUnauthenticatedLogin() | 86 | public void T010_TestUnauthenticatedLogin() |
85 | { | 87 | { |
88 | TestHelper.InMethod(); | ||
86 | // We want to use our own LoginService for this test, one that | 89 | // We want to use our own LoginService for this test, one that |
87 | // doesn't require authentication. | 90 | // doesn't require authentication. |
88 | LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", m_commsManager.InterServiceInventoryService, | 91 | LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", m_commsManager.InterServiceInventoryService, |
@@ -119,6 +122,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
119 | [Test] | 122 | [Test] |
120 | public void T011_TestAuthenticatedLoginSuccess() | 123 | public void T011_TestAuthenticatedLoginSuccess() |
121 | { | 124 | { |
125 | TestHelper.InMethod(); | ||
122 | // TODO: Not check inventory part of response yet. | 126 | // TODO: Not check inventory part of response yet. |
123 | // TODO: Not checking all of login response thoroughly yet. | 127 | // TODO: Not checking all of login response thoroughly yet. |
124 | 128 | ||
@@ -168,6 +172,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
168 | [Test] | 172 | [Test] |
169 | public void T012_TestAuthenticatedLoginForBuddies() | 173 | public void T012_TestAuthenticatedLoginForBuddies() |
170 | { | 174 | { |
175 | TestHelper.InMethod(); | ||
171 | // 1.1) Test for budddies! | 176 | // 1.1) Test for budddies! |
172 | m_localUserServices.AddUser("Friend","Number1","boingboing","abc@ftw.com",42,43); | 177 | m_localUserServices.AddUser("Friend","Number1","boingboing","abc@ftw.com",42,43); |
173 | m_localUserServices.AddUser("Friend","Number2","boingboing","abc@ftw.com",42,43); | 178 | m_localUserServices.AddUser("Friend","Number2","boingboing","abc@ftw.com",42,43); |
@@ -207,6 +212,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
207 | [Test] | 212 | [Test] |
208 | public void T020_TestAuthenticatedLoginBadUsername() | 213 | public void T020_TestAuthenticatedLoginBadUsername() |
209 | { | 214 | { |
215 | TestHelper.InMethod(); | ||
210 | 216 | ||
211 | // 2) Test for negative authentication | 217 | // 2) Test for negative authentication |
212 | // | 218 | // |
@@ -234,6 +240,8 @@ namespace OpenSim.Framework.Communications.Tests | |||
234 | [Test] | 240 | [Test] |
235 | public void T021_TestAuthenticatedLoginBadPassword() | 241 | public void T021_TestAuthenticatedLoginBadPassword() |
236 | { | 242 | { |
243 | TestHelper.InMethod(); | ||
244 | |||
237 | string error_auth_message = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist."; | 245 | string error_auth_message = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist."; |
238 | // 2.2) Test for wrong password | 246 | // 2.2) Test for wrong password |
239 | Hashtable loginParams = new Hashtable(); | 247 | Hashtable loginParams = new Hashtable(); |
@@ -257,6 +265,8 @@ namespace OpenSim.Framework.Communications.Tests | |||
257 | [Test] | 265 | [Test] |
258 | public void T022_TestAuthenticatedLoginBadXml() | 266 | public void T022_TestAuthenticatedLoginBadXml() |
259 | { | 267 | { |
268 | TestHelper.InMethod(); | ||
269 | |||
260 | string error_xml_message = "Error connecting to grid. Could not percieve credentials from login XML."; | 270 | string error_xml_message = "Error connecting to grid. Could not percieve credentials from login XML."; |
261 | // 2.3) Bad XML | 271 | // 2.3) Bad XML |
262 | Hashtable loginParams = new Hashtable(); | 272 | Hashtable loginParams = new Hashtable(); |
@@ -280,6 +290,8 @@ namespace OpenSim.Framework.Communications.Tests | |||
280 | [Test] | 290 | [Test] |
281 | public void T023_TestAuthenticatedLoginAlreadyLoggedIn() | 291 | public void T023_TestAuthenticatedLoginAlreadyLoggedIn() |
282 | { | 292 | { |
293 | TestHelper.InMethod(); | ||
294 | |||
283 | //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()"); | 295 | //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()"); |
284 | //log4net.Config.XmlConfigurator.Configure(); | 296 | //log4net.Config.XmlConfigurator.Configure(); |
285 | 297 | ||