diff options
author | UbitUmarov | 2012-03-09 03:00:31 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-09 03:00:31 +0000 |
commit | fc4dc7708dc07dc41791de64d7a6b2586d3170b5 (patch) | |
tree | 2b807fd97cdef06e671b52f3e735b849b05f9cfc /OpenSim/Tests | |
parent | more changes on undo/redo group scaling seems to work better (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.zip opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.tar.gz opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.tar.bz2 opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 22 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/NPCTortureTests.cs | 11 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/ObjectTortureTests.cs | 23 | ||||
-rw-r--r-- | OpenSim/Tests/Torture/ScriptTortureTests.cs | 9 |
5 files changed, 41 insertions, 28 deletions
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index aa904aa..7bf08ae 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Tests.Common | |||
113 | Console.WriteLine("Setting up test scene {0}", name); | 113 | Console.WriteLine("Setting up test scene {0}", name); |
114 | 114 | ||
115 | // We must set up a console otherwise setup of some modules may fail | 115 | // We must set up a console otherwise setup of some modules may fail |
116 | MainConsole.Instance = new MockConsole("TEST PROMPT"); | 116 | MainConsole.Instance = new MockConsole(); |
117 | 117 | ||
118 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); | 118 | RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); |
119 | regInfo.RegionName = name; | 119 | regInfo.RegionName = name; |
@@ -136,7 +136,7 @@ namespace OpenSim.Tests.Common | |||
136 | StartAuthenticationService(testScene); | 136 | StartAuthenticationService(testScene); |
137 | LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene); | 137 | LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene); |
138 | StartGridService(testScene); | 138 | StartGridService(testScene); |
139 | LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene); | 139 | LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene); |
140 | LocalPresenceServicesConnector presenceService = StartPresenceService(testScene); | 140 | LocalPresenceServicesConnector presenceService = StartPresenceService(testScene); |
141 | 141 | ||
142 | inventoryService.PostInitialise(); | 142 | inventoryService.PostInitialise(); |
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 79bb9c2..295e868 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | |||
@@ -177,9 +177,9 @@ namespace OpenSim.Data.Null | |||
177 | // Therefore, we need to store parts rather than groups. | 177 | // Therefore, we need to store parts rather than groups. |
178 | foreach (SceneObjectPart prim in obj.Parts) | 178 | foreach (SceneObjectPart prim in obj.Parts) |
179 | { | 179 | { |
180 | m_log.DebugFormat( | 180 | // m_log.DebugFormat( |
181 | "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", | 181 | // "[MOCK REGION DATA PLUGIN]: Storing part {0} {1} in object {2} {3} in region {4}", |
182 | prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); | 182 | // prim.Name, prim.UUID, obj.Name, obj.UUID, regionUUID); |
183 | 183 | ||
184 | m_sceneObjectParts[prim.UUID] = prim; | 184 | m_sceneObjectParts[prim.UUID] = prim; |
185 | } | 185 | } |
@@ -193,9 +193,9 @@ namespace OpenSim.Data.Null | |||
193 | { | 193 | { |
194 | if (part.ParentGroup.UUID == obj) | 194 | if (part.ParentGroup.UUID == obj) |
195 | { | 195 | { |
196 | m_log.DebugFormat( | 196 | // m_log.DebugFormat( |
197 | "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", | 197 | // "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", |
198 | part.Name, part.UUID, obj, regionUUID); | 198 | // part.Name, part.UUID, obj, regionUUID); |
199 | m_sceneObjectParts.Remove(part.UUID); | 199 | m_sceneObjectParts.Remove(part.UUID); |
200 | } | 200 | } |
201 | } | 201 | } |
@@ -215,8 +215,8 @@ namespace OpenSim.Data.Null | |||
215 | { | 215 | { |
216 | if (prim.IsRoot) | 216 | if (prim.IsRoot) |
217 | { | 217 | { |
218 | m_log.DebugFormat( | 218 | // m_log.DebugFormat( |
219 | "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); | 219 | // "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); |
220 | objects[prim.UUID] = new SceneObjectGroup(prim); | 220 | objects[prim.UUID] = new SceneObjectGroup(prim); |
221 | } | 221 | } |
222 | } | 222 | } |
@@ -240,9 +240,9 @@ namespace OpenSim.Data.Null | |||
240 | } | 240 | } |
241 | else | 241 | else |
242 | { | 242 | { |
243 | m_log.WarnFormat( | 243 | // m_log.WarnFormat( |
244 | "[MOCK REGION DATA PLUGIN]: Database contains an orphan child prim {0} {1} in region {2} pointing to missing parent {3}. This prim will not be loaded.", | 244 | // "[MOCK REGION DATA PLUGIN]: Database contains an orphan child prim {0} {1} in region {2} pointing to missing parent {3}. This prim will not be loaded.", |
245 | prim.Name, prim.UUID, regionUUID, prim.ParentUUID); | 245 | // prim.Name, prim.UUID, regionUUID, prim.ParentUUID); |
246 | } | 246 | } |
247 | } | 247 | } |
248 | } | 248 | } |
diff --git a/OpenSim/Tests/Torture/NPCTortureTests.cs b/OpenSim/Tests/Torture/NPCTortureTests.cs index 8078d9d..0224505 100644 --- a/OpenSim/Tests/Torture/NPCTortureTests.cs +++ b/OpenSim/Tests/Torture/NPCTortureTests.cs | |||
@@ -75,6 +75,11 @@ namespace OpenSim.Tests.Torture | |||
75 | [TestFixtureTearDown] | 75 | [TestFixtureTearDown] |
76 | public void TearDown() | 76 | public void TearDown() |
77 | { | 77 | { |
78 | scene.Close(); | ||
79 | scene = null; | ||
80 | GC.Collect(); | ||
81 | GC.WaitForPendingFinalizers(); | ||
82 | |||
78 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple | 83 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple |
79 | // threads. Possibly, later tests should be rewritten not to worry about such things. | 84 | // threads. Possibly, later tests should be rewritten not to worry about such things. |
80 | Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; | 85 | Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; |
@@ -98,7 +103,7 @@ namespace OpenSim.Tests.Torture | |||
98 | } | 103 | } |
99 | 104 | ||
100 | [Test] | 105 | [Test] |
101 | public void TestAddRemove100NPCs() | 106 | public void Test_0001_AddRemove100NPCs() |
102 | { | 107 | { |
103 | TestHelpers.InMethod(); | 108 | TestHelpers.InMethod(); |
104 | // log4net.Config.XmlConfigurator.Configure(); | 109 | // log4net.Config.XmlConfigurator.Configure(); |
@@ -107,7 +112,7 @@ namespace OpenSim.Tests.Torture | |||
107 | } | 112 | } |
108 | 113 | ||
109 | [Test] | 114 | [Test] |
110 | public void TestAddRemove1000NPCs() | 115 | public void Test_0002_AddRemove1000NPCs() |
111 | { | 116 | { |
112 | TestHelpers.InMethod(); | 117 | TestHelpers.InMethod(); |
113 | // log4net.Config.XmlConfigurator.Configure(); | 118 | // log4net.Config.XmlConfigurator.Configure(); |
@@ -116,7 +121,7 @@ namespace OpenSim.Tests.Torture | |||
116 | } | 121 | } |
117 | 122 | ||
118 | [Test] | 123 | [Test] |
119 | public void TestAddRemove2000NPCs() | 124 | public void Test_0003_AddRemove2000NPCs() |
120 | { | 125 | { |
121 | TestHelpers.InMethod(); | 126 | TestHelpers.InMethod(); |
122 | // log4net.Config.XmlConfigurator.Configure(); | 127 | // log4net.Config.XmlConfigurator.Configure(); |
diff --git a/OpenSim/Tests/Torture/ObjectTortureTests.cs b/OpenSim/Tests/Torture/ObjectTortureTests.cs index e83186a..978a308 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(); |
@@ -156,11 +159,6 @@ namespace OpenSim.Tests.Torture | |||
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(); |
158 | 161 | ||
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 | |||
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)", |
166 | Math.Round(elapsed.TotalMilliseconds), | 164 | Math.Round(elapsed.TotalMilliseconds), |
@@ -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 |
diff --git a/OpenSim/Tests/Torture/ScriptTortureTests.cs b/OpenSim/Tests/Torture/ScriptTortureTests.cs index d94bbde..2ef55b3 100644 --- a/OpenSim/Tests/Torture/ScriptTortureTests.cs +++ b/OpenSim/Tests/Torture/ScriptTortureTests.cs | |||
@@ -91,6 +91,15 @@ namespace OpenSim.Tests.Torture | |||
91 | m_scene.StartScripts(); | 91 | m_scene.StartScripts(); |
92 | } | 92 | } |
93 | 93 | ||
94 | [TearDown] | ||
95 | public void TearDown() | ||
96 | { | ||
97 | m_scene.Close(); | ||
98 | m_scene = null; | ||
99 | GC.Collect(); | ||
100 | GC.WaitForPendingFinalizers(); | ||
101 | } | ||
102 | |||
94 | [Test] | 103 | [Test] |
95 | public void TestCompileAndStart100Scripts() | 104 | public void TestCompileAndStart100Scripts() |
96 | { | 105 | { |