* Fixed a few more async calls. Still not uncommented, some asserts still failing
parent
2afd733229
commit
d4ed7b03af
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
@ -116,6 +117,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_userInfo.FetchInventory();
|
m_userInfo.FetchInventory();
|
||||||
|
for (int i = 0 ; i < 50 ; i++)
|
||||||
|
{
|
||||||
|
if (m_userInfo.HasReceivedInventory == true)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
cm.UserAdminService.AddUser(userFirstName, userLastName, string.Empty, string.Empty, 1000, 1000, userId);
|
cm.UserAdminService.AddUser(userFirstName, userLastName, string.Empty, string.Empty, 1000, 1000, userId);
|
||||||
CachedUserInfo userInfo = cm.UserProfileCacheService.GetUserDetails(userId);
|
CachedUserInfo userInfo = cm.UserProfileCacheService.GetUserDetails(userId);
|
||||||
userInfo.FetchInventory();
|
userInfo.FetchInventory();
|
||||||
while (!userInfo.HasReceivedInventory){ };
|
for (int i = 0 ; i < 50 ; i++)
|
||||||
|
{
|
||||||
|
if (userInfo.HasReceivedInventory == true)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
|
Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
|
||||||
|
|
||||||
// Create asset
|
// Create asset
|
||||||
SceneObjectGroup object1;
|
SceneObjectGroup object1;
|
||||||
|
@ -249,8 +255,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
|
|
||||||
CachedUserInfo userInfo
|
CachedUserInfo userInfo
|
||||||
= scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
|
= scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
|
||||||
|
userInfo.FetchInventory();
|
||||||
|
for (int i = 0 ; i < 50 ; i++)
|
||||||
|
{
|
||||||
|
if (userInfo.HasReceivedInventory == true)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
|
Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
|
||||||
InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
|
InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
|
||||||
|
Assert.That(foundItem, Is.Not.Null);
|
||||||
Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
|
Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
|
||||||
Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid));
|
Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid));
|
||||||
Assert.That(foundItem.Owner, Is.EqualTo(userUuid));
|
Assert.That(foundItem.Owner, Is.EqualTo(userUuid));
|
||||||
|
@ -318,6 +332,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
|
|
||||||
CachedUserInfo userInfo
|
CachedUserInfo userInfo
|
||||||
= scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
|
= scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
|
||||||
|
userInfo.FetchInventory();
|
||||||
|
for (int i = 0 ; i < 50 ; i++)
|
||||||
|
{
|
||||||
|
if (userInfo.HasReceivedInventory == true)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
|
Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
|
||||||
InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
|
InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
|
||||||
|
|
||||||
Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
|
Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
|
||||||
|
@ -339,6 +361,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
CommunicationsManager commsManager = scene.CommsManager;
|
CommunicationsManager commsManager = scene.CommsManager;
|
||||||
|
|
||||||
CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager);
|
CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager);
|
||||||
|
userInfo.FetchInventory();
|
||||||
|
for (int i = 0 ; i < 50 ; i++)
|
||||||
|
{
|
||||||
|
if (userInfo.HasReceivedInventory == true)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
|
Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
|
||||||
Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>();
|
Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>();
|
||||||
List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>();
|
List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue