diff options
author | Sean Dague | 2009-08-05 14:44:25 -0400 |
---|---|---|
committer | Sean Dague | 2009-08-05 14:44:25 -0400 |
commit | 8f4048c63aa9fcceda7dd24b691cadecf62ef9fa (patch) | |
tree | 5880b62399e293b739428d01404667bdc332d2da /OpenSim | |
parent | fixing hooks (diff) | |
parent | Reinstate TestLoadIarV0_1ExistingUsers(), removing unnecessary wait (diff) | |
download | opensim-SC-8f4048c63aa9fcceda7dd24b691cadecf62ef9fa.zip opensim-SC-8f4048c63aa9fcceda7dd24b691cadecf62ef9fa.tar.gz opensim-SC-8f4048c63aa9fcceda7dd24b691cadecf62ef9fa.tar.bz2 opensim-SC-8f4048c63aa9fcceda7dd24b691cadecf62ef9fa.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 23 | ||||
-rw-r--r-- | OpenSim/Tests/Common/TestHelper.cs | 2 |
2 files changed, 13 insertions, 12 deletions
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 | |||
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> |
diff --git a/OpenSim/Tests/Common/TestHelper.cs b/OpenSim/Tests/Common/TestHelper.cs index f0b3376..4abf2e3 100644 --- a/OpenSim/Tests/Common/TestHelper.cs +++ b/OpenSim/Tests/Common/TestHelper.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Tests.Common | |||
54 | public static void InMethod() | 54 | public static void InMethod() |
55 | { | 55 | { |
56 | StackTrace stackTrace = new StackTrace(); | 56 | StackTrace stackTrace = new StackTrace(); |
57 | Console.WriteLine("==> In Test Method : {0}", stackTrace.GetFrame(1).GetMethod().Name); | 57 | Console.WriteLine("===> In Test Method : {0} <===", stackTrace.GetFrame(1).GetMethod().Name); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |