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 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
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");
--
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/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
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/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
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/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs')
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