diff options
author | Justin Clarke Casey | 2008-11-21 18:46:24 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-21 18:46:24 +0000 |
commit | 02105c9c2a652914a454e5f75b2197d88c36b867 (patch) | |
tree | db7c4b19ea96d46289ed579fa0573febda925d31 | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC_OLD-02105c9c2a652914a454e5f75b2197d88c36b867.zip opensim-SC_OLD-02105c9c2a652914a454e5f75b2197d88c36b867.tar.gz opensim-SC_OLD-02105c9c2a652914a454e5f75b2197d88c36b867.tar.bz2 opensim-SC_OLD-02105c9c2a652914a454e5f75b2197d88c36b867.tar.xz |
* Extend sog delete to inventory test to crank the normally async sog deleter by hand
* After the crank, assert that the object has now been removed from the scene
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs | 13 |
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 |