diff options
author | UbitUmarov | 2015-12-10 17:04:39 +0000 |
---|---|---|
committer | UbitUmarov | 2015-12-10 17:04:39 +0000 |
commit | 6de7da467a508a28cd11c13ed1ad2e8400520b21 (patch) | |
tree | 7977fb85e6cb76f50666a9bb9c133a3655c3e5f6 /OpenSim/Region/Framework/Scenes/Tests | |
parent | remove some SOG references on delete to help GC (diff) | |
download | opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.zip opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.tar.gz opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.tar.bz2 opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.tar.xz |
keep SOG reference to root part since two many things depend on deleted SOGs not being deleted
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 098f1b4..ac8c32d 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -171,11 +171,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
171 | // Test that we don't get back an object for a local id that doesn't exist | 171 | // Test that we don't get back an object for a local id that doesn't exist |
172 | Assert.That(scene.GetGroupByPrim(999), Is.Null); | 172 | Assert.That(scene.GetGroupByPrim(999), Is.Null); |
173 | 173 | ||
174 | uint soid = so.LocalId; | ||
175 | uint spid = parts[partsToTestCount - 1].LocalId; | ||
176 | |||
174 | // Now delete the scene object and check again | 177 | // Now delete the scene object and check again |
175 | scene.DeleteSceneObject(so, false); | 178 | scene.DeleteSceneObject(so, false); |
176 | 179 | ||
177 | Assert.That(scene.GetGroupByPrim(so.LocalId), Is.Null); | 180 | Assert.That(scene.GetGroupByPrim(soid), Is.Null); |
178 | Assert.That(scene.GetGroupByPrim(parts[partsToTestCount - 1].LocalId), Is.Null); | 181 | Assert.That(scene.GetGroupByPrim(spid), Is.Null); |
179 | } | 182 | } |
180 | 183 | ||
181 | /// <summary> | 184 | /// <summary> |
@@ -194,12 +197,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
194 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene); | 197 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene); |
195 | 198 | ||
196 | Assert.That(so.IsDeleted, Is.False); | 199 | Assert.That(so.IsDeleted, Is.False); |
200 | uint retrievedPartID = so.LocalId; | ||
197 | 201 | ||
198 | scene.DeleteSceneObject(so, false); | 202 | scene.DeleteSceneObject(so, false); |
199 | 203 | ||
200 | Assert.That(so.IsDeleted, Is.True); | 204 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(retrievedPartID); |
201 | 205 | ||
202 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId); | ||
203 | Assert.That(retrievedPart, Is.Null); | 206 | Assert.That(retrievedPart, Is.Null); |
204 | } | 207 | } |
205 | 208 | ||