diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestScene.cs | 3 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/ObjectTortureTests.cs | 21 |
2 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 328cd2b..eea68c3 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs | |||
@@ -50,7 +50,8 @@ namespace OpenSim.Tests.Common.Mock | |||
50 | 50 | ||
51 | ~TestScene() | 51 | ~TestScene() |
52 | { | 52 | { |
53 | Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName); | 53 | //Console.WriteLine("TestScene destructor called for {0}", RegionInfo.RegionName); |
54 | Console.WriteLine("TestScene destructor called"); | ||
54 | } | 55 | } |
55 | 56 | ||
56 | /// <summary> | 57 | /// <summary> |
diff --git a/OpenSim/Tests/Torture/ObjectTortureTests.cs b/OpenSim/Tests/Torture/ObjectTortureTests.cs index 74b336e..e83186a 100644 --- a/OpenSim/Tests/Torture/ObjectTortureTests.cs +++ b/OpenSim/Tests/Torture/ObjectTortureTests.cs | |||
@@ -49,6 +49,13 @@ namespace OpenSim.Tests.Torture | |||
49 | [TestFixture] | 49 | [TestFixture] |
50 | public class ObjectTortureTests | 50 | public class ObjectTortureTests |
51 | { | 51 | { |
52 | [TearDown] | ||
53 | public void TearDown() | ||
54 | { | ||
55 | GC.Collect(); | ||
56 | GC.WaitForPendingFinalizers(); | ||
57 | } | ||
58 | |||
52 | // [Test] | 59 | // [Test] |
53 | // public void Test0000Clean() | 60 | // public void Test0000Clean() |
54 | // { | 61 | // { |
@@ -141,8 +148,18 @@ namespace OpenSim.Tests.Torture | |||
141 | string.Format("Object {0} could not be retrieved", i)); | 148 | string.Format("Object {0} could not be retrieved", i)); |
142 | } | 149 | } |
143 | 150 | ||
144 | // This does not work to fire the SceneObjectGroup destructors - something else is hanging on to them. | 151 | // When a scene object is added to a scene, it is placed in the update list for sending to viewers |
145 | // scene.DeleteAllSceneObjects(); | 152 | // (though in this case we have none). When it is deleted, it is not removed from the update which is |
153 | // fine since it will later be ignored. | ||
154 | // | ||
155 | // However, that means that we need to manually run an update here to clear out that list so that deleted | ||
156 | // objects will be clean up by the garbage collector before the next stress test is run. | ||
157 | scene.Update(); | ||
158 | |||
159 | // Currently, we need to do this in order to garbage collect the scene objects ready for the next test run. | ||
160 | // However, what we really need to do is find out why the entire scene is not garbage collected in | ||
161 | // teardown. | ||
162 | scene.DeleteAllSceneObjects(); | ||
146 | 163 | ||
147 | Console.WriteLine( | 164 | Console.WriteLine( |
148 | "Took {0}ms, {1}MB ({2} - {3}) to create {4} objects each containing {5} prim(s)", | 165 | "Took {0}ms, {1}MB ({2} - {3}) to create {4} objects each containing {5} prim(s)", |