aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorSean Dague2009-08-06 14:03:16 -0400
committerSean Dague2009-08-06 14:03:16 -0400
commit4078a331e2e851c051293472776ebebcc5dbaecc (patch)
treec172fb9173821f9a30d37ee336f6592ccaf4510f /OpenSim/Region/CoreModules
parentskip sqlite tests on z linux, as sqlite doesn't work right on the platform (diff)
parentAdd the config-include statement to OpenSim.ini.example. (diff)
downloadopensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.zip
opensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.tar.gz
opensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.tar.bz2
opensim-SC_OLD-4078a331e2e851c051293472776ebebcc5dbaecc.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs33
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs1
2 files changed, 21 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 4928ede..14cee36 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
202 /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where 202 /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
203 /// an account exists with the creator name. 203 /// an account exists with the creator name.
204 /// </summary> 204 /// </summary>
205 //[Test] 205 [Test]
206 public void TestLoadIarV0_1ExistingUsers() 206 public void TestLoadIarV0_1ExistingUsers()
207 { 207 {
208 TestHelper.InMethod(); 208 TestHelper.InMethod();
209 209
210 //log4net.Config.XmlConfigurator.Configure(); 210 log4net.Config.XmlConfigurator.Configure();
211 211
212 string userFirstName = "Mr"; 212 string userFirstName = "Mr";
213 string userLastName = "Tiddles"; 213 string userLastName = "Tiddles";
214 UUID userUuid = UUID.Parse("00000000-0000-0000-0000-000000000555"); 214 UUID userUuid = UUID.Parse("00000000-0000-0000-0000-000000000555");
215 string user2FirstName = "Lord"; 215 string userItemCreatorFirstName = "Lord";
216 string user2LastName = "Lucan"; 216 string userItemCreatorLastName = "Lucan";
217 UUID user2Uuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 217 UUID userItemCreatorUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
218 218
219 string itemName = "b.lsl"; 219 string itemName = "b.lsl";
220 string archiveItemName 220 string archiveItemName
@@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
227 item1.Name = itemName; 227 item1.Name = itemName;
228 item1.AssetID = UUID.Random(); 228 item1.AssetID = UUID.Random();
229 item1.GroupID = UUID.Random(); 229 item1.GroupID = UUID.Random();
230 item1.CreatorId = OspResolver.MakeOspa(user2FirstName, user2LastName); 230 item1.CreatorId = OspResolver.MakeOspa(userItemCreatorFirstName, userItemCreatorLastName);
231 //item1.CreatorId = userUuid.ToString(); 231 //item1.CreatorId = userUuid.ToString();
232 //item1.CreatorId = "00000000-0000-0000-0000-000000000444"; 232 //item1.CreatorId = "00000000-0000-0000-0000-000000000444";
233 item1.Owner = UUID.Zero; 233 item1.Owner = UUID.Zero;
@@ -249,13 +249,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
249 userAdminService.AddUser( 249 userAdminService.AddUser(
250 userFirstName, userLastName, "meowfood", String.Empty, 1000, 1000, userUuid); 250 userFirstName, userLastName, "meowfood", String.Empty, 1000, 1000, userUuid);
251 userAdminService.AddUser( 251 userAdminService.AddUser(
252 user2FirstName, user2LastName, "hampshire", String.Empty, 1000, 1000, user2Uuid); 252 userItemCreatorFirstName, userItemCreatorLastName, "hampshire",
253 String.Empty, 1000, 1000, userItemCreatorUuid);
253 254
254 archiverModule.DearchiveInventory(userFirstName, userLastName, "/", archiveReadStream); 255 archiverModule.DearchiveInventory(userFirstName, userLastName, "/", archiveReadStream);
255 256
256 CachedUserInfo userInfo 257 CachedUserInfo userInfo
257 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); 258 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
258 userInfo.FetchInventory(); 259 //userInfo.FetchInventory();
260 /*
259 for (int i = 0 ; i < 50 ; i++) 261 for (int i = 0 ; i < 50 ; i++)
260 { 262 {
261 if (userInfo.HasReceivedInventory == true) 263 if (userInfo.HasReceivedInventory == true)
@@ -263,18 +265,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
263 Thread.Sleep(200); 265 Thread.Sleep(200);
264 } 266 }
265 Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); 267 Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
268 */
266 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); 269 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
267 Assert.That(foundItem, Is.Not.Null, "Didn't find loaded item"); 270 Assert.That(foundItem, Is.Not.Null, "Didn't find loaded item");
268 Assert.That( 271 Assert.That(
269 foundItem.CreatorId, Is.EqualTo(item1.CreatorId), 272 foundItem.CreatorId, Is.EqualTo(item1.CreatorId),
270 "Loaded item non-uuid creator doesn't match original"); 273 "Loaded item non-uuid creator doesn't match original");
271 Assert.That( 274 Assert.That(
272 foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid), 275 foundItem.CreatorIdAsUuid, Is.EqualTo(userItemCreatorUuid),
273 "Loaded item uuid creator doesn't match original"); 276 "Loaded item uuid creator doesn't match original");
274 Assert.That(foundItem.Owner, Is.EqualTo(userUuid), 277 Assert.That(foundItem.Owner, Is.EqualTo(userUuid),
275 "Loaded item owner doesn't match inventory reciever"); 278 "Loaded item owner doesn't match inventory reciever");
276
277 Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
278 } 279 }
279 280
280 /// <summary> 281 /// <summary>
@@ -367,6 +368,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
367 368
368 CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); 369 CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager);
369 userInfo.FetchInventory(); 370 userInfo.FetchInventory();
371 /*
370 for (int i = 0 ; i < 50 ; i++) 372 for (int i = 0 ; i < 50 ; i++)
371 { 373 {
372 if (userInfo.HasReceivedInventory == true) 374 if (userInfo.HasReceivedInventory == true)
@@ -374,6 +376,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
374 Thread.Sleep(200); 376 Thread.Sleep(200);
375 } 377 }
376 Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)"); 378 Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
379 */
380
381 Console.WriteLine("userInfo.RootFolder 1: {0}", userInfo.RootFolder);
382
377 Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>(); 383 Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>();
378 List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); 384 List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>();
379 385
@@ -391,10 +397,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
391 = string.Format( 397 = string.Format(
392 "{0}{1}/{2}/{3}", 398 "{0}{1}/{2}/{3}",
393 ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName); 399 ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName);
400
401 Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder);
394 402
395 new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null, null) 403 new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null, null)
396 .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded); 404 .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded);
397 405
406 Console.WriteLine("userInfo.RootFolder 3: {0}", userInfo.RootFolder);
398 InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); 407 InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a");
399 Assert.That(folder1, Is.Not.Null, "Could not find folder a"); 408 Assert.That(folder1, Is.Not.Null, "Could not find folder a");
400 InventoryFolderImpl folder2 = folder1.FindFolderByPath("b"); 409 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;
39using OpenSim.Services.Interfaces; 39using OpenSim.Services.Interfaces;
40using OpenMetaverse; 40using OpenMetaverse;
41 41
42
43namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory 42namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
44{ 43{
45 public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService 44 public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService