From a4ce63d0cd5dacdd33c6563bbc1af29ef5d36755 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 24 Nov 2012 03:38:15 +0000 Subject: Fix regression TestDeleteSceneObjectAsyncToUserInventory by adding a BasicInventoryAccessModule() and re-enable in test suite. --- .../Framework/Scenes/Tests/SceneObjectBasicTests.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 5b334c6..373094b 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs @@ -29,10 +29,12 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Threading; +using Nini.Config; using NUnit.Framework; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; +using OpenSim.Region.CoreModules.Framework.InventoryAccess; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; @@ -239,28 +241,31 @@ namespace OpenSim.Region.Framework.Scenes.Tests /// /// Test deleting an object asynchronously to user inventory. /// -// [Test] + [Test] public void TestDeleteSceneObjectAsyncToUserInventory() { TestHelpers.InMethod(); - TestHelpers.EnableLogging(); +// TestHelpers.EnableLogging(); UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); string myObjectName = "Fred"; TestScene scene = new SceneHelpers().SetupScene(); + IConfigSource configSource = new IniConfigSource(); + IConfig config = configSource.AddConfig("Modules"); + config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); + SceneHelpers.SetupSceneModules( + scene, configSource, new object[] { new BasicInventoryAccessModule() }); + + SceneHelpers.SetupSceneModules(scene, new object[] { }); + // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; sogd.Enabled = false; SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId); -// Assert.That( -// scene.CommsManager.UserAdminService.AddUser( -// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), -// Is.EqualTo(agentId)); - UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId); InventoryFolderBase folder1 = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1"); -- cgit v1.1