aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs13
2 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
index 19ba5fa..20cf318 100644
--- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -114,7 +114,11 @@ namespace OpenSim.Region.Environment.Scenes
114 } 114 }
115 } 115 }
116 116
117 private bool InventoryDeQueueAndDelete() 117 /// <summary>
118 /// Move the next object in the queue to inventory. Then delete it properly from the scene.
119 /// </summary>
120 /// <returns></returns>
121 public bool InventoryDeQueueAndDelete()
118 { 122 {
119 DeleteToInventoryHolder x = null; 123 DeleteToInventoryHolder x = null;
120 124
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
index 1cc95fc..a24161e 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
@@ -91,7 +91,12 @@ namespace OpenSim.Region.Environment.Scenes.Tests
91 { 91 {
92 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); 92 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
93 93
94 TestScene scene = SceneTestUtils.SetupScene(); 94 TestScene scene = SceneTestUtils.SetupScene();
95
96 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
97 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
98 sogd.Enabled = false;
99
95 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene); 100 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
96 101
97 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId); 102 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
@@ -99,6 +104,12 @@ namespace OpenSim.Region.Environment.Scenes.Tests
99 104
100 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 105 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
101 Assert.That(retrievedPart, Is.Not.Null); 106 Assert.That(retrievedPart, Is.Not.Null);
107
108 sogd.InventoryDeQueueAndDelete();
109 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
110 Assert.That(retrievedPart2, Is.Null);
111
112 // TODO: test that the object actually made it successfully into inventory
102 } 113 }
103 } 114 }
104} \ No newline at end of file 115} \ No newline at end of file