aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Torture/ObjectTortureTests.cs
diff options
context:
space:
mode:
authorDan Lake2012-03-27 12:51:58 -0700
committerDan Lake2012-03-27 12:51:58 -0700
commit971d32fda3cf8384987a6709cd2242afecce13ab (patch)
tree2607c27fad429ff0036fe7b7d275ddf717397282 /OpenSim/Tests/Torture/ObjectTortureTests.cs
parentWhen loading objects from DB, first add to scene, then call TriggerOnSceneObj... (diff)
parentHG: beginning of a more restrictive inventory access procedure (optional). Ex... (diff)
downloadopensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.zip
opensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.tar.gz
opensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.tar.bz2
opensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Tests/Torture/ObjectTortureTests.cs')
-rw-r--r--OpenSim/Tests/Torture/ObjectTortureTests.cs25
1 files changed, 12 insertions, 13 deletions
diff --git a/OpenSim/Tests/Torture/ObjectTortureTests.cs b/OpenSim/Tests/Torture/ObjectTortureTests.cs
index e83186a..d0d2199 100644
--- a/OpenSim/Tests/Torture/ObjectTortureTests.cs
+++ b/OpenSim/Tests/Torture/ObjectTortureTests.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Tests.Torture
66// } 66// }
67 67
68 [Test] 68 [Test]
69 public void Test0001_10K_1PrimObjects() 69 public void Test_0001_10K_1PrimObjects()
70 { 70 {
71 TestHelpers.InMethod(); 71 TestHelpers.InMethod();
72// log4net.Config.XmlConfigurator.Configure(); 72// log4net.Config.XmlConfigurator.Configure();
@@ -75,7 +75,7 @@ namespace OpenSim.Tests.Torture
75 } 75 }
76 76
77 [Test] 77 [Test]
78 public void Test0002_100K_1PrimObjects() 78 public void Test_0002_100K_1PrimObjects()
79 { 79 {
80 TestHelpers.InMethod(); 80 TestHelpers.InMethod();
81// log4net.Config.XmlConfigurator.Configure(); 81// log4net.Config.XmlConfigurator.Configure();
@@ -84,7 +84,7 @@ namespace OpenSim.Tests.Torture
84 } 84 }
85 85
86 [Test] 86 [Test]
87 public void Test0003_200K_1PrimObjects() 87 public void Test_0003_200K_1PrimObjects()
88 { 88 {
89 TestHelpers.InMethod(); 89 TestHelpers.InMethod();
90// log4net.Config.XmlConfigurator.Configure(); 90// log4net.Config.XmlConfigurator.Configure();
@@ -93,7 +93,7 @@ namespace OpenSim.Tests.Torture
93 } 93 }
94 94
95 [Test] 95 [Test]
96 public void Test0011_100_100PrimObjects() 96 public void Test_0011_100_100PrimObjects()
97 { 97 {
98 TestHelpers.InMethod(); 98 TestHelpers.InMethod();
99// log4net.Config.XmlConfigurator.Configure(); 99// log4net.Config.XmlConfigurator.Configure();
@@ -102,7 +102,7 @@ namespace OpenSim.Tests.Torture
102 } 102 }
103 103
104 [Test] 104 [Test]
105 public void Test0012_1K_100PrimObjects() 105 public void Test_0012_1K_100PrimObjects()
106 { 106 {
107 TestHelpers.InMethod(); 107 TestHelpers.InMethod();
108// log4net.Config.XmlConfigurator.Configure(); 108// log4net.Config.XmlConfigurator.Configure();
@@ -111,7 +111,7 @@ namespace OpenSim.Tests.Torture
111 } 111 }
112 112
113 [Test] 113 [Test]
114 public void Test0013_2K_100PrimObjects() 114 public void Test_0013_2K_100PrimObjects()
115 { 115 {
116 TestHelpers.InMethod(); 116 TestHelpers.InMethod();
117// log4net.Config.XmlConfigurator.Configure(); 117// log4net.Config.XmlConfigurator.Configure();
@@ -123,6 +123,9 @@ namespace OpenSim.Tests.Torture
123 { 123 {
124 UUID ownerId = new UUID("F0000000-0000-0000-0000-000000000000"); 124 UUID ownerId = new UUID("F0000000-0000-0000-0000-000000000000");
125 125
126 // Using a local variable for scene, at least on mono 2.6.7, means that it's much more likely to be garbage
127 // collected when we teardown this test. If it's done in a member variable, even if that is subsequently
128 // nulled out, the garbage collect can be delayed.
126 TestScene scene = SceneHelpers.SetupScene(); 129 TestScene scene = SceneHelpers.SetupScene();
127 130
128// Process process = Process.GetCurrentProcess(); 131// Process process = Process.GetCurrentProcess();
@@ -154,12 +157,7 @@ namespace OpenSim.Tests.Torture
154 // 157 //
155 // However, that means that we need to manually run an update here to clear out that list so that deleted 158 // 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. 159 // objects will be clean up by the garbage collector before the next stress test is run.
157 scene.Update(); 160 scene.Update(1);
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();
163 161
164 Console.WriteLine( 162 Console.WriteLine(
165 "Took {0}ms, {1}MB ({2} - {3}) to create {4} objects each containing {5} prim(s)", 163 "Took {0}ms, {1}MB ({2} - {3}) to create {4} objects each containing {5} prim(s)",
@@ -170,7 +168,8 @@ namespace OpenSim.Tests.Torture
170 objectsToAdd, 168 objectsToAdd,
171 primsInEachObject); 169 primsInEachObject);
172 170
173 scene = null; 171 scene.Close();
172// scene = null;
174 } 173 }
175 } 174 }
176} \ No newline at end of file 175} \ No newline at end of file