From 3323413f53fd39cdbba4e247c6a8a63278150b10 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Wed, 5 Aug 2009 17:17:20 +0100 Subject: reinstate TestReplicateArchivePathToUserInventory() --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index dd524f5..780327f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -353,7 +353,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// /// Test replication of an archive path to the user's inventory. /// - //[Test] + [Test] public void TestReplicateArchivePathToUserInventory() { TestHelper.InMethod(); -- cgit v1.1 From 190bdc8a2e8fa842759087749592769f951834ab Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Wed, 5 Aug 2009 17:33:23 +0100 Subject: * Remove some mono compiler warnings --- .../TextureDownload/UserTextureDownloadService.cs | 29 +++++++++++----------- .../CoreModules/Scripting/LSLHttp/UrlModule.cs | 6 ++--- 2 files changed, 17 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs index 5be2a65..65138e2 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs @@ -45,8 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload /// public class UserTextureDownloadService { - private static readonly ILog m_log - = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// True if the service has been closed, probably because a user with texture requests still queued @@ -88,13 +87,13 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload /// XXX This is really a temporary solution to deal with the situation where a client continually requests /// the same missing textures /// - private readonly IRequestLimitStrategy missingTextureLimitStrategy - = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); +// private readonly IRequestLimitStrategy missingTextureLimitStrategy +// = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); public UserTextureDownloadService( IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue sharedQueue) { - m_client = client; +// m_client = client; m_scene = scene; m_sharedSendersQueue = sharedQueue; } @@ -231,16 +230,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload /// Place a ready texture sender on the processing queue. /// /// - private void EnqueueTextureSender(ITextureSender textureSender) - { - textureSender.Cancel = false; - textureSender.Sending = true; - - if (!m_sharedSendersQueue.Contains(textureSender)) - { - m_sharedSendersQueue.Enqueue(textureSender); - } - } +// private void EnqueueTextureSender(ITextureSender textureSender) +// { +// textureSender.Cancel = false; +// textureSender.Sending = true; +// +// if (!m_sharedSendersQueue.Contains(textureSender)) +// { +// m_sharedSendersQueue.Enqueue(textureSender); +// } +// } /// /// Close this module. diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 7082e85..ad42523 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -60,9 +60,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp public class UrlModule : ISharedRegionModule, IUrlModule { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); private Dictionary m_RequestMap = new Dictionary(); -- cgit v1.1 From e5904c388388ae5be4eb466c0c70f0ef4c628446 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Wed, 5 Aug 2009 17:39:32 +0100 Subject: remove some more mono compiler warnings --- .../Agent/TextureDownload/UserTextureDownloadService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs index 65138e2..19f0f90 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs @@ -60,22 +60,22 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload /// currently handle properly as far as I know). However, this situation should be handled in a more /// sophisticated way. /// - private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; +// private static readonly int MAX_ALLOWED_TEXTURE_REQUESTS = 5; /// /// XXX Also going to limit requests for found textures. /// - private readonly IRequestLimitStrategy foundTextureLimitStrategy - = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); +// private readonly IRequestLimitStrategy foundTextureLimitStrategy +// = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); - private readonly IClientAPI m_client; +// private readonly IClientAPI m_client; private readonly Scene m_scene; /// /// Texture Senders are placed in this queue once they have received their texture from the asset /// cache. Another module actually invokes the send. /// - private readonly OpenSim.Framework.BlockingQueue m_sharedSendersQueue; +// private readonly OpenSim.Framework.BlockingQueue m_sharedSendersQueue; /// /// Holds texture senders before they have received the appropriate texture from the asset cache. @@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload { // m_client = client; m_scene = scene; - m_sharedSendersQueue = sharedQueue; +// m_sharedSendersQueue = sharedQueue; } /// -- cgit v1.1 From 9e0f1b7fef658d7873b5cce994b7beb1bbc4ca30 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Aug 2009 18:01:18 +0100 Subject: reinstate TestSaveIarV0_1() --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 780327f..cf3b29f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// /// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet). /// - //[Test] + [Test] public void TestSaveIarV0_1() { TestHelper.InMethod(); -- cgit v1.1 From 1b65bd5861dd8e36e05c1f9c69040270b0855b5c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Aug 2009 18:21:22 +0100 Subject: Recomment TestReplicateArchivePathToUserInventory() for now due to occasional test fail --- .../Inventory/Archiver/Tests/InventoryArchiverTests.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index cf3b29f..4928ede 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -264,17 +264,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests } Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); - Assert.That(foundItem, Is.Not.Null); - Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId)); - Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid)); - Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); + Assert.That(foundItem, Is.Not.Null, "Didn't find loaded item"); + Assert.That( + foundItem.CreatorId, Is.EqualTo(item1.CreatorId), + "Loaded item non-uuid creator doesn't match original"); + Assert.That( + foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid), + "Loaded item uuid creator doesn't match original"); + Assert.That(foundItem.Owner, Is.EqualTo(userUuid), + "Loaded item owner doesn't match inventory reciever"); Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); } /// /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where - /// no account exists with the creator name + /// no account exists with the creator name /// //[Test] public void TestLoadIarV0_1TempProfiles() @@ -353,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// /// Test replication of an archive path to the user's inventory. /// - [Test] + //[Test] public void TestReplicateArchivePathToUserInventory() { TestHelper.InMethod(); -- cgit v1.1 From f8d8f07cb44853710706559632e709af5fc8971b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Aug 2009 18:59:44 +0100 Subject: Remove waiting in TestReplicateArchivePathToUserInventory() since local inventory loading is synchronous Insert a little more debugging info in case the occasional failure reoccurs --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 7 +++++-- .../Inventory/LocalInventoryServiceConnector.cs | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 4928ede..95308ea 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -358,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// /// Test replication of an archive path to the user's inventory. /// - //[Test] + [Test] public void TestReplicateArchivePathToUserInventory() { TestHelper.InMethod(); @@ -367,6 +367,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); userInfo.FetchInventory(); + /* for (int i = 0 ; i < 50 ; i++) { if (userInfo.HasReceivedInventory == true) @@ -374,6 +375,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests Thread.Sleep(200); } Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); + */ Dictionary foldersCreated = new Dictionary(); List nodesLoaded = new List(); @@ -394,7 +396,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null, null) .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded); - + + Console.WriteLine("userInfo.RootFolder: {0}", userInfo.RootFolder); InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); Assert.That(folder1, Is.Not.Null, "Could not find folder a"); InventoryFolderImpl folder2 = folder1.FindFolderByPath("b"); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index a304357..e70d985 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -39,7 +39,6 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using OpenMetaverse; - namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService -- cgit v1.1 From 9e5736eeeccee4c96a0a7b80a099f6705ceb09e3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Aug 2009 19:06:07 +0100 Subject: insert a little more debug info for TestReplicateArchivePathToUserInventory() --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 95308ea..cd14340 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -376,6 +376,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests } Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); */ + + Console.WriteLine("userInfo.RootFolder 1: {0}", userInfo.RootFolder); + Dictionary foldersCreated = new Dictionary(); List nodesLoaded = new List(); @@ -393,11 +396,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests = string.Format( "{0}{1}/{2}/{3}", ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName); + + Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder); new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null, null) .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded); - Console.WriteLine("userInfo.RootFolder: {0}", userInfo.RootFolder); + Console.WriteLine("userInfo.RootFolder 3: {0}", userInfo.RootFolder); InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); Assert.That(folder1, Is.Not.Null, "Could not find folder a"); InventoryFolderImpl folder2 = folder1.FindFolderByPath("b"); -- cgit v1.1 From 07e00e110d6954eb995382fc0e03af19a46811ab Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Aug 2009 19:38:45 +0100 Subject: Reinstate TestLoadIarV0_1ExistingUsers(), removing unnecessary wait --- .../Archiver/Tests/InventoryArchiverTests.cs | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index cd14340..877a2ac 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -202,19 +202,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where /// an account exists with the creator name. /// - //[Test] + [Test] public void TestLoadIarV0_1ExistingUsers() { TestHelper.InMethod(); - //log4net.Config.XmlConfigurator.Configure(); + log4net.Config.XmlConfigurator.Configure(); string userFirstName = "Mr"; string userLastName = "Tiddles"; UUID userUuid = UUID.Parse("00000000-0000-0000-0000-000000000555"); - string user2FirstName = "Lord"; - string user2LastName = "Lucan"; - UUID user2Uuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); + string userItemCreatorFirstName = "Lord"; + string userItemCreatorLastName = "Lucan"; + UUID userItemCreatorUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); string itemName = "b.lsl"; string archiveItemName @@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests item1.Name = itemName; item1.AssetID = UUID.Random(); item1.GroupID = UUID.Random(); - item1.CreatorId = OspResolver.MakeOspa(user2FirstName, user2LastName); + item1.CreatorId = OspResolver.MakeOspa(userItemCreatorFirstName, userItemCreatorLastName); //item1.CreatorId = userUuid.ToString(); //item1.CreatorId = "00000000-0000-0000-0000-000000000444"; item1.Owner = UUID.Zero; @@ -249,13 +249,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests userAdminService.AddUser( userFirstName, userLastName, "meowfood", String.Empty, 1000, 1000, userUuid); userAdminService.AddUser( - user2FirstName, user2LastName, "hampshire", String.Empty, 1000, 1000, user2Uuid); + userItemCreatorFirstName, userItemCreatorLastName, "hampshire", + String.Empty, 1000, 1000, userItemCreatorUuid); archiverModule.DearchiveInventory(userFirstName, userLastName, "/", archiveReadStream); CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); - userInfo.FetchInventory(); + //userInfo.FetchInventory(); + /* for (int i = 0 ; i < 50 ; i++) { if (userInfo.HasReceivedInventory == true) @@ -263,18 +265,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests Thread.Sleep(200); } Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); + */ InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); Assert.That(foundItem, Is.Not.Null, "Didn't find loaded item"); Assert.That( foundItem.CreatorId, Is.EqualTo(item1.CreatorId), "Loaded item non-uuid creator doesn't match original"); Assert.That( - foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid), + foundItem.CreatorIdAsUuid, Is.EqualTo(userItemCreatorUuid), "Loaded item uuid creator doesn't match original"); Assert.That(foundItem.Owner, Is.EqualTo(userUuid), "Loaded item owner doesn't match inventory reciever"); - - Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); } /// -- cgit v1.1 From bc6de6f5f0c40db9b9f5073089f75a99f518b219 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Aug 2009 20:05:22 +0100 Subject: Disable TestReplicateArchivePathToUserInventory() pending more investigation --- .../Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 877a2ac..14cee36 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -359,7 +359,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// /// Test replication of an archive path to the user's inventory. /// - [Test] + //[Test] public void TestReplicateArchivePathToUserInventory() { TestHelper.InMethod(); -- cgit v1.1