From ce0a84cbc0e277dd5be08a20febf13364a985a3a Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 7 May 2009 19:07:08 +0000 Subject: instrument most of the tests with a new InMethod function that may help us figure out where that pesky deadlock is during test runs. --- .../Tests/Cache/UserProfileCacheServiceTests.cs | 14 ++++++++++++++ .../Framework/Communications/Tests/LoginServiceTests.cs | 12 ++++++++++++ 2 files changed, 26 insertions(+) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 2972a0a..75848b7 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs @@ -34,6 +34,7 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Communications.Local; using OpenSim.Tests.Common.Mock; using OpenSim.Tests.Common.Setup; +using OpenSim.Tests.Common; namespace OpenSim.Framework.Communications.Tests { @@ -43,6 +44,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestGetUserDetails() { + TestHelper.InMethod(); + UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000002"); string firstName = "Bill"; string lastName = "Bailey"; @@ -109,6 +112,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestFetchInventory() { + TestHelper.InMethod(); + TestCommunicationsManager commsManager = new TestCommunicationsManager(); CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); @@ -118,6 +123,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestGetChildFolder() { + TestHelper.InMethod(); + TestCommunicationsManager commsManager = new TestCommunicationsManager(); CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); @@ -132,6 +139,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestCreateFolder() { + TestHelper.InMethod(); + TestCommunicationsManager commsManager = new TestCommunicationsManager(); IInventoryDataPlugin inventoryDataPlugin = commsManager.InventoryDataPlugin; @@ -159,6 +168,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestUpdateFolder() { + TestHelper.InMethod(); + TestCommunicationsManager commsManager = new TestCommunicationsManager(); IInventoryDataPlugin inventoryDataPlugin = commsManager.InventoryDataPlugin; @@ -213,6 +224,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestMoveFolder() { + TestHelper.InMethod(); + TestCommunicationsManager commsManager = new TestCommunicationsManager(); IInventoryDataPlugin inventoryDataPlugin = commsManager.InventoryDataPlugin; @@ -244,6 +257,7 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void TestPurgeFolder() { + TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); TestCommunicationsManager commsManager = new TestCommunicationsManager(); 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; using OpenSim.Region.Communications.Local; using OpenSim.Tests.Common.Mock; using OpenSim.Client.Linden; +using OpenSim.Tests.Common; namespace OpenSim.Framework.Communications.Tests { @@ -45,6 +46,7 @@ namespace OpenSim.Framework.Communications.Tests /// Test the login service. For now, most of this will be done through the LocalLoginService as LoginService /// is abstract /// + [TestFixture] public class LoginServiceTests { @@ -83,6 +85,7 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T010_TestUnauthenticatedLogin() { + TestHelper.InMethod(); // We want to use our own LoginService for this test, one that // doesn't require authentication. LoginService loginService = new LLStandaloneLoginService((UserManagerBase)m_commsManager.UserService, "Hello folks", m_commsManager.InterServiceInventoryService, @@ -119,6 +122,7 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T011_TestAuthenticatedLoginSuccess() { + TestHelper.InMethod(); // TODO: Not check inventory part of response yet. // TODO: Not checking all of login response thoroughly yet. @@ -168,6 +172,7 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T012_TestAuthenticatedLoginForBuddies() { + TestHelper.InMethod(); // 1.1) Test for budddies! m_localUserServices.AddUser("Friend","Number1","boingboing","abc@ftw.com",42,43); m_localUserServices.AddUser("Friend","Number2","boingboing","abc@ftw.com",42,43); @@ -207,6 +212,7 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T020_TestAuthenticatedLoginBadUsername() { + TestHelper.InMethod(); // 2) Test for negative authentication // @@ -234,6 +240,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T021_TestAuthenticatedLoginBadPassword() { + TestHelper.InMethod(); + string error_auth_message = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist."; // 2.2) Test for wrong password Hashtable loginParams = new Hashtable(); @@ -257,6 +265,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T022_TestAuthenticatedLoginBadXml() { + TestHelper.InMethod(); + string error_xml_message = "Error connecting to grid. Could not percieve credentials from login XML."; // 2.3) Bad XML Hashtable loginParams = new Hashtable(); @@ -280,6 +290,8 @@ namespace OpenSim.Framework.Communications.Tests [Test] public void T023_TestAuthenticatedLoginAlreadyLoggedIn() { + TestHelper.InMethod(); + //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()"); //log4net.Config.XmlConfigurator.Configure(); -- cgit v1.1