diff options
author | Justin Clark-Casey (justincc) | 2009-08-05 19:38:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-08-05 19:38:45 +0100 |
commit | 07e00e110d6954eb995382fc0e03af19a46811ab (patch) | |
tree | f00a23b296a2a66571f759275bc02c5fb153afe1 /OpenSim/Region/CoreModules | |
parent | test commit for new hook changes (diff) | |
download | opensim-SC-07e00e110d6954eb995382fc0e03af19a46811ab.zip opensim-SC-07e00e110d6954eb995382fc0e03af19a46811ab.tar.gz opensim-SC-07e00e110d6954eb995382fc0e03af19a46811ab.tar.bz2 opensim-SC-07e00e110d6954eb995382fc0e03af19a46811ab.tar.xz |
Reinstate TestLoadIarV0_1ExistingUsers(), removing unnecessary wait
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 23 |
1 files changed, 12 insertions, 11 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> |