diff options
author | Melanie | 2012-11-25 14:13:50 +0000 |
---|---|---|
committer | Melanie | 2012-11-25 14:13:50 +0000 |
commit | fd7a83f439132062d500471830eb26e7183d30bc (patch) | |
tree | db581710c1a370ee4f5ac7a3b2f0dfc9bcbd5457 /OpenSim/Framework | |
parent | Merge branch 'careminster' into avination (diff) | |
parent | Combine TestDeleteSceneObjectAsync() with TestDeRezSceneObject() as they are ... (diff) | |
download | opensim-SC_OLD-fd7a83f439132062d500471830eb26e7183d30bc.zip opensim-SC_OLD-fd7a83f439132062d500471830eb26e7183d30bc.tar.gz opensim-SC_OLD-fd7a83f439132062d500471830eb26e7183d30bc.tar.bz2 opensim-SC_OLD-fd7a83f439132062d500471830eb26e7183d30bc.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Serialization/ArchiveConstants.cs | 5 | ||||
-rw-r--r-- | OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Serialization/Tests/RegionSettingsSerializerTests.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 122 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 53 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/ServerBase.cs | 111 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/Tests/OSHttpTests.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/Tests/VersionInfoTests.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/AgentCircuitDataTest.cs | 5 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/AnimationTests.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/AssetBaseTest.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/CacheTests.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/LocationTest.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/MundaneFrameworkTests.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/PrimeNumberHelperTests.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Tests/UtilTest.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 16 |
17 files changed, 148 insertions, 193 deletions
diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs index 48f1c4f..0c12787 100644 --- a/OpenSim/Framework/Serialization/ArchiveConstants.cs +++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs | |||
@@ -154,6 +154,11 @@ namespace OpenSim.Framework.Serialization | |||
154 | EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder; | 154 | EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder; |
155 | } | 155 | } |
156 | 156 | ||
157 | public static string CreateOarLandDataPath(LandData ld) | ||
158 | { | ||
159 | return string.Format("{0}{1}.xml", ArchiveConstants.LANDDATA_PATH, ld.GlobalID); | ||
160 | } | ||
161 | |||
157 | /// <summary> | 162 | /// <summary> |
158 | /// Create the filename used to store an object in an OpenSim Archive. | 163 | /// Create the filename used to store an object in an OpenSim Archive. |
159 | /// </summary> | 164 | /// </summary> |
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs index 8b9756b..ea100ee 100644 --- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs +++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs | |||
@@ -37,7 +37,7 @@ using OpenSim.Tests.Common; | |||
37 | namespace OpenSim.Framework.Serialization.Tests | 37 | namespace OpenSim.Framework.Serialization.Tests |
38 | { | 38 | { |
39 | [TestFixture] | 39 | [TestFixture] |
40 | public class LandDataSerializerTest | 40 | public class LandDataSerializerTest : OpenSimTestCase |
41 | { | 41 | { |
42 | private LandData land; | 42 | private LandData land; |
43 | private LandData landWithParcelAccessList; | 43 | private LandData landWithParcelAccessList; |
diff --git a/OpenSim/Framework/Serialization/Tests/RegionSettingsSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/RegionSettingsSerializerTests.cs index 09b6f6d..142726b 100644 --- a/OpenSim/Framework/Serialization/Tests/RegionSettingsSerializerTests.cs +++ b/OpenSim/Framework/Serialization/Tests/RegionSettingsSerializerTests.cs | |||
@@ -37,7 +37,7 @@ using OpenSim.Tests.Common; | |||
37 | namespace OpenSim.Framework.Serialization.Tests | 37 | namespace OpenSim.Framework.Serialization.Tests |
38 | { | 38 | { |
39 | [TestFixture] | 39 | [TestFixture] |
40 | public class RegionSettingsSerializerTests | 40 | public class RegionSettingsSerializerTests : OpenSimTestCase |
41 | { | 41 | { |
42 | private string m_serializedRs = @"<?xml version=""1.0"" encoding=""utf-16""?> | 42 | private string m_serializedRs = @"<?xml version=""1.0"" encoding=""utf-16""?> |
43 | <RegionSettings> | 43 | <RegionSettings> |
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 2c21800..cb47cbf 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Diagnostics; | ||
31 | using System.IO; | 30 | using System.IO; |
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using System.Text; | 32 | using System.Text; |
@@ -99,34 +98,6 @@ namespace OpenSim.Framework.Servers | |||
99 | m_console.Commands.AddCommand("General", false, "shutdown", | 98 | m_console.Commands.AddCommand("General", false, "shutdown", |
100 | "shutdown", | 99 | "shutdown", |
101 | "Quit the application", HandleQuit); | 100 | "Quit the application", HandleQuit); |
102 | |||
103 | m_console.Commands.AddCommand("General", false, "show threads", | ||
104 | "show threads", | ||
105 | "Show thread status", HandleShow); | ||
106 | |||
107 | m_console.Commands.AddCommand("General", false, "show version", | ||
108 | "show version", | ||
109 | "Show server version", HandleShow); | ||
110 | |||
111 | m_console.Commands.AddCommand("General", false, "threads abort", | ||
112 | "threads abort <thread-id>", | ||
113 | "Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort); | ||
114 | |||
115 | m_console.Commands.AddCommand("General", false, "threads show", | ||
116 | "threads show", | ||
117 | "Show thread status. Synonym for \"show threads\"", | ||
118 | (string module, string[] args) => Notice(GetThreadsReport())); | ||
119 | |||
120 | m_console.Commands.AddCommand("General", false, "force gc", | ||
121 | "force gc", | ||
122 | "Manually invoke runtime garbage collection. For debugging purposes", | ||
123 | HandleForceGc); | ||
124 | } | ||
125 | |||
126 | private void HandleForceGc(string module, string[] args) | ||
127 | { | ||
128 | MainConsole.Instance.Output("Manually invoking runtime garbage collection"); | ||
129 | GC.Collect(); | ||
130 | } | 101 | } |
131 | 102 | ||
132 | /// <summary> | 103 | /// <summary> |
@@ -159,54 +130,6 @@ namespace OpenSim.Framework.Servers | |||
159 | } | 130 | } |
160 | 131 | ||
161 | /// <summary> | 132 | /// <summary> |
162 | /// Get a report about the registered threads in this server. | ||
163 | /// </summary> | ||
164 | protected string GetThreadsReport() | ||
165 | { | ||
166 | // This should be a constant field. | ||
167 | string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}"; | ||
168 | |||
169 | StringBuilder sb = new StringBuilder(); | ||
170 | Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreadsInfo(); | ||
171 | |||
172 | sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine); | ||
173 | |||
174 | int timeNow = Environment.TickCount & Int32.MaxValue; | ||
175 | |||
176 | sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE"); | ||
177 | sb.Append(Environment.NewLine); | ||
178 | |||
179 | foreach (Watchdog.ThreadWatchdogInfo twi in threads) | ||
180 | { | ||
181 | Thread t = twi.Thread; | ||
182 | |||
183 | sb.AppendFormat( | ||
184 | reportFormat, | ||
185 | t.ManagedThreadId, | ||
186 | t.Name, | ||
187 | timeNow - twi.LastTick, | ||
188 | timeNow - twi.FirstTick, | ||
189 | t.Priority, | ||
190 | t.ThreadState); | ||
191 | |||
192 | sb.Append("\n"); | ||
193 | } | ||
194 | |||
195 | sb.Append("\n"); | ||
196 | |||
197 | // For some reason mono 2.6.7 returns an empty threads set! Not going to confuse people by reporting | ||
198 | // zero active threads. | ||
199 | int totalThreads = Process.GetCurrentProcess().Threads.Count; | ||
200 | if (totalThreads > 0) | ||
201 | sb.AppendFormat("Total threads active: {0}\n\n", totalThreads); | ||
202 | |||
203 | sb.Append("Main threadpool (excluding script engine pools)\n"); | ||
204 | sb.Append(Util.GetThreadPoolReport()); | ||
205 | |||
206 | return sb.ToString(); | ||
207 | } | ||
208 | |||
209 | /// <summary> | ||
210 | /// Performs initialisation of the scene, such as loading configuration from disk. | 133 | /// Performs initialisation of the scene, such as loading configuration from disk. |
211 | /// </summary> | 134 | /// </summary> |
212 | public virtual void Startup() | 135 | public virtual void Startup() |
@@ -246,50 +169,7 @@ namespace OpenSim.Framework.Servers | |||
246 | private void HandleQuit(string module, string[] args) | 169 | private void HandleQuit(string module, string[] args) |
247 | { | 170 | { |
248 | Shutdown(); | 171 | Shutdown(); |
249 | } | 172 | } |
250 | |||
251 | public override void HandleShow(string module, string[] cmd) | ||
252 | { | ||
253 | base.HandleShow(module, cmd); | ||
254 | |||
255 | List<string> args = new List<string>(cmd); | ||
256 | |||
257 | args.RemoveAt(0); | ||
258 | |||
259 | string[] showParams = args.ToArray(); | ||
260 | |||
261 | switch (showParams[0]) | ||
262 | { | ||
263 | case "threads": | ||
264 | Notice(GetThreadsReport()); | ||
265 | break; | ||
266 | |||
267 | case "version": | ||
268 | Notice(GetVersionText()); | ||
269 | break; | ||
270 | } | ||
271 | } | ||
272 | |||
273 | public virtual void HandleThreadsAbort(string module, string[] cmd) | ||
274 | { | ||
275 | if (cmd.Length != 3) | ||
276 | { | ||
277 | MainConsole.Instance.Output("Usage: threads abort <thread-id>"); | ||
278 | return; | ||
279 | } | ||
280 | |||
281 | int threadId; | ||
282 | if (!int.TryParse(cmd[2], out threadId)) | ||
283 | { | ||
284 | MainConsole.Instance.Output("ERROR: Thread id must be an integer"); | ||
285 | return; | ||
286 | } | ||
287 | |||
288 | if (Watchdog.AbortThread(threadId)) | ||
289 | MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId); | ||
290 | else | ||
291 | MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId); | ||
292 | } | ||
293 | 173 | ||
294 | public string osSecret { | 174 | public string osSecret { |
295 | // Secret uuid for the simulator | 175 | // Secret uuid for the simulator |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 77fce9e..93043cb 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -1283,59 +1283,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1283 | map["login"] = OSD.FromString("false"); | 1283 | map["login"] = OSD.FromString("false"); |
1284 | return map; | 1284 | return map; |
1285 | } | 1285 | } |
1286 | /// <summary> | ||
1287 | /// A specific agent handler was provided. Such a handler is expecetd to have an | ||
1288 | /// intimate, and highly specific relationship with the client. Consequently, | ||
1289 | /// nothing is done here. | ||
1290 | /// </summary> | ||
1291 | /// <param name="handler"></param> | ||
1292 | /// <param name="request"></param> | ||
1293 | /// <param name="response"></param> | ||
1294 | |||
1295 | private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response) | ||
1296 | { | ||
1297 | // In the case of REST, then handler is responsible for ALL aspects of | ||
1298 | // the request/response handling. Nothing is done here, not even encoding. | ||
1299 | |||
1300 | try | ||
1301 | { | ||
1302 | return handler.Handle(request, response); | ||
1303 | } | ||
1304 | catch (Exception e) | ||
1305 | { | ||
1306 | // If the handler did in fact close the stream, then this will blow | ||
1307 | // chunks. So that that doesn't disturb anybody we throw away any | ||
1308 | // and all exceptions raised. We've done our best to release the | ||
1309 | // client. | ||
1310 | try | ||
1311 | { | ||
1312 | m_log.Warn("[HTTP-AGENT]: Error - " + e.Message); | ||
1313 | response.SendChunked = false; | ||
1314 | response.KeepAlive = true; | ||
1315 | response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError; | ||
1316 | //response.OutputStream.Close(); | ||
1317 | try | ||
1318 | { | ||
1319 | response.Send(); | ||
1320 | //response.FreeContext(); | ||
1321 | } | ||
1322 | catch (SocketException f) | ||
1323 | { | ||
1324 | // This has to be here to prevent a Linux/Mono crash | ||
1325 | m_log.Warn( | ||
1326 | String.Format("[BASE HTTP SERVER]: XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux. ", f.Message), f); | ||
1327 | } | ||
1328 | } | ||
1329 | catch(Exception) | ||
1330 | { | ||
1331 | } | ||
1332 | } | ||
1333 | |||
1334 | // Indicate that the request has been "handled" | ||
1335 | |||
1336 | return true; | ||
1337 | |||
1338 | } | ||
1339 | 1286 | ||
1340 | public byte[] HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) | 1287 | public byte[] HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) |
1341 | { | 1288 | { |
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index c182a3a..47baac8 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs | |||
@@ -27,16 +27,19 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Diagnostics; | ||
30 | using System.IO; | 31 | using System.IO; |
31 | using System.Reflection; | 32 | using System.Reflection; |
32 | using System.Text; | 33 | using System.Text; |
33 | using System.Text.RegularExpressions; | 34 | using System.Text.RegularExpressions; |
35 | using System.Threading; | ||
34 | using log4net; | 36 | using log4net; |
35 | using log4net.Appender; | 37 | using log4net.Appender; |
36 | using log4net.Core; | 38 | using log4net.Core; |
37 | using log4net.Repository; | 39 | using log4net.Repository; |
38 | using Nini.Config; | 40 | using Nini.Config; |
39 | using OpenSim.Framework.Console; | 41 | using OpenSim.Framework.Console; |
42 | using OpenSim.Framework.Monitoring; | ||
40 | 43 | ||
41 | namespace OpenSim.Framework.Servers | 44 | namespace OpenSim.Framework.Servers |
42 | { | 45 | { |
@@ -168,6 +171,9 @@ namespace OpenSim.Framework.Servers | |||
168 | "General", false, "show info", "show info", "Show general information about the server", HandleShow); | 171 | "General", false, "show info", "show info", "Show general information about the server", HandleShow); |
169 | 172 | ||
170 | m_console.Commands.AddCommand( | 173 | m_console.Commands.AddCommand( |
174 | "General", false, "show version", "show version", "Show server version", HandleShow); | ||
175 | |||
176 | m_console.Commands.AddCommand( | ||
171 | "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow); | 177 | "General", false, "show uptime", "show uptime", "Show server uptime", HandleShow); |
172 | 178 | ||
173 | m_console.Commands.AddCommand( | 179 | m_console.Commands.AddCommand( |
@@ -206,6 +212,34 @@ namespace OpenSim.Framework.Servers | |||
206 | "General", false, "command-script", | 212 | "General", false, "command-script", |
207 | "command-script <script>", | 213 | "command-script <script>", |
208 | "Run a command script from file", HandleScript); | 214 | "Run a command script from file", HandleScript); |
215 | |||
216 | m_console.Commands.AddCommand( | ||
217 | "General", false, "show threads", | ||
218 | "show threads", | ||
219 | "Show thread status", HandleShow); | ||
220 | |||
221 | m_console.Commands.AddCommand( | ||
222 | "General", false, "threads abort", | ||
223 | "threads abort <thread-id>", | ||
224 | "Abort a managed thread. Use \"show threads\" to find possible threads.", HandleThreadsAbort); | ||
225 | |||
226 | m_console.Commands.AddCommand( | ||
227 | "General", false, "threads show", | ||
228 | "threads show", | ||
229 | "Show thread status. Synonym for \"show threads\"", | ||
230 | (string module, string[] args) => Notice(GetThreadsReport())); | ||
231 | |||
232 | m_console.Commands.AddCommand( | ||
233 | "General", false, "force gc", | ||
234 | "force gc", | ||
235 | "Manually invoke runtime garbage collection. For debugging purposes", | ||
236 | HandleForceGc); | ||
237 | } | ||
238 | |||
239 | private void HandleForceGc(string module, string[] args) | ||
240 | { | ||
241 | Notice("Manually invoking runtime garbage collection"); | ||
242 | GC.Collect(); | ||
209 | } | 243 | } |
210 | 244 | ||
211 | public virtual void HandleShow(string module, string[] cmd) | 245 | public virtual void HandleShow(string module, string[] cmd) |
@@ -222,9 +256,17 @@ namespace OpenSim.Framework.Servers | |||
222 | ShowInfo(); | 256 | ShowInfo(); |
223 | break; | 257 | break; |
224 | 258 | ||
259 | case "version": | ||
260 | Notice(GetVersionText()); | ||
261 | break; | ||
262 | |||
225 | case "uptime": | 263 | case "uptime": |
226 | Notice(GetUptimeReport()); | 264 | Notice(GetUptimeReport()); |
227 | break; | 265 | break; |
266 | |||
267 | case "threads": | ||
268 | Notice(GetThreadsReport()); | ||
269 | break; | ||
228 | } | 270 | } |
229 | } | 271 | } |
230 | 272 | ||
@@ -537,6 +579,75 @@ namespace OpenSim.Framework.Servers | |||
537 | } | 579 | } |
538 | 580 | ||
539 | /// <summary> | 581 | /// <summary> |
582 | /// Get a report about the registered threads in this server. | ||
583 | /// </summary> | ||
584 | protected string GetThreadsReport() | ||
585 | { | ||
586 | // This should be a constant field. | ||
587 | string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}"; | ||
588 | |||
589 | StringBuilder sb = new StringBuilder(); | ||
590 | Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreadsInfo(); | ||
591 | |||
592 | sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine); | ||
593 | |||
594 | int timeNow = Environment.TickCount & Int32.MaxValue; | ||
595 | |||
596 | sb.AppendFormat(reportFormat, "ID", "NAME", "LAST UPDATE (MS)", "LIFETIME (MS)", "PRIORITY", "STATE"); | ||
597 | sb.Append(Environment.NewLine); | ||
598 | |||
599 | foreach (Watchdog.ThreadWatchdogInfo twi in threads) | ||
600 | { | ||
601 | Thread t = twi.Thread; | ||
602 | |||
603 | sb.AppendFormat( | ||
604 | reportFormat, | ||
605 | t.ManagedThreadId, | ||
606 | t.Name, | ||
607 | timeNow - twi.LastTick, | ||
608 | timeNow - twi.FirstTick, | ||
609 | t.Priority, | ||
610 | t.ThreadState); | ||
611 | |||
612 | sb.Append("\n"); | ||
613 | } | ||
614 | |||
615 | sb.Append("\n"); | ||
616 | |||
617 | // For some reason mono 2.6.7 returns an empty threads set! Not going to confuse people by reporting | ||
618 | // zero active threads. | ||
619 | int totalThreads = Process.GetCurrentProcess().Threads.Count; | ||
620 | if (totalThreads > 0) | ||
621 | sb.AppendFormat("Total threads active: {0}\n\n", totalThreads); | ||
622 | |||
623 | sb.Append("Main threadpool (excluding script engine pools)\n"); | ||
624 | sb.Append(Util.GetThreadPoolReport()); | ||
625 | |||
626 | return sb.ToString(); | ||
627 | } | ||
628 | |||
629 | public virtual void HandleThreadsAbort(string module, string[] cmd) | ||
630 | { | ||
631 | if (cmd.Length != 3) | ||
632 | { | ||
633 | MainConsole.Instance.Output("Usage: threads abort <thread-id>"); | ||
634 | return; | ||
635 | } | ||
636 | |||
637 | int threadId; | ||
638 | if (!int.TryParse(cmd[2], out threadId)) | ||
639 | { | ||
640 | MainConsole.Instance.Output("ERROR: Thread id must be an integer"); | ||
641 | return; | ||
642 | } | ||
643 | |||
644 | if (Watchdog.AbortThread(threadId)) | ||
645 | MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId); | ||
646 | else | ||
647 | MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId); | ||
648 | } | ||
649 | |||
650 | /// <summary> | ||
540 | /// Console output is only possible if a console has been established. | 651 | /// Console output is only possible if a console has been established. |
541 | /// That is something that cannot be determined within this class. So | 652 | /// That is something that cannot be determined within this class. So |
542 | /// all attempts to use the console MUST be verified. | 653 | /// all attempts to use the console MUST be verified. |
diff --git a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs index 4c2f586..50f306e 100644 --- a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs +++ b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs | |||
@@ -35,11 +35,12 @@ using HttpServer; | |||
35 | using HttpServer.FormDecoders; | 35 | using HttpServer.FormDecoders; |
36 | using NUnit.Framework; | 36 | using NUnit.Framework; |
37 | using OpenSim.Framework.Servers.HttpServer; | 37 | using OpenSim.Framework.Servers.HttpServer; |
38 | using OpenSim.Tests.Common; | ||
38 | 39 | ||
39 | namespace OpenSim.Framework.Servers.Tests | 40 | namespace OpenSim.Framework.Servers.Tests |
40 | { | 41 | { |
41 | [TestFixture] | 42 | [TestFixture] |
42 | public class OSHttpTests | 43 | public class OSHttpTests : OpenSimTestCase |
43 | { | 44 | { |
44 | // we need an IHttpClientContext for our tests | 45 | // we need an IHttpClientContext for our tests |
45 | public class TestHttpClientContext: IHttpClientContext | 46 | public class TestHttpClientContext: IHttpClientContext |
diff --git a/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs b/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs index 49e5061..480f2bb 100644 --- a/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs +++ b/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs | |||
@@ -29,11 +29,12 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using NUnit.Framework; | 31 | using NUnit.Framework; |
32 | using OpenSim.Tests.Common; | ||
32 | 33 | ||
33 | namespace OpenSim.Framework.Servers.Tests | 34 | namespace OpenSim.Framework.Servers.Tests |
34 | { | 35 | { |
35 | [TestFixture] | 36 | [TestFixture] |
36 | public class VersionInfoTests | 37 | public class VersionInfoTests : OpenSimTestCase |
37 | { | 38 | { |
38 | [Test] | 39 | [Test] |
39 | public void TestVersionLength() | 40 | public void TestVersionLength() |
diff --git a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs index 0dce414..95e9439 100644 --- a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs +++ b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs | |||
@@ -24,16 +24,17 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | |||
27 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
28 | using OpenMetaverse; | 29 | using OpenMetaverse; |
29 | using OpenMetaverse.StructuredData; | 30 | using OpenMetaverse.StructuredData; |
30 | using NUnit.Framework; | 31 | using NUnit.Framework; |
31 | 32 | using OpenSim.Tests.Common; | |
32 | 33 | ||
33 | namespace OpenSim.Framework.Tests | 34 | namespace OpenSim.Framework.Tests |
34 | { | 35 | { |
35 | [TestFixture] | 36 | [TestFixture] |
36 | public class AgentCircuitDataTest | 37 | public class AgentCircuitDataTest : OpenSimTestCase |
37 | { | 38 | { |
38 | private UUID AgentId; | 39 | private UUID AgentId; |
39 | private AvatarAppearance AvAppearance; | 40 | private AvatarAppearance AvAppearance; |
diff --git a/OpenSim/Framework/Tests/AnimationTests.cs b/OpenSim/Framework/Tests/AnimationTests.cs index 967a355..f3be81b 100644 --- a/OpenSim/Framework/Tests/AnimationTests.cs +++ b/OpenSim/Framework/Tests/AnimationTests.cs | |||
@@ -38,7 +38,7 @@ using Animation = OpenSim.Framework.Animation; | |||
38 | namespace OpenSim.Framework.Tests | 38 | namespace OpenSim.Framework.Tests |
39 | { | 39 | { |
40 | [TestFixture] | 40 | [TestFixture] |
41 | public class AnimationTests | 41 | public class AnimationTests : OpenSimTestCase |
42 | { | 42 | { |
43 | private Animation anim1 = null; | 43 | private Animation anim1 = null; |
44 | private Animation anim2 = null; | 44 | private Animation anim2 = null; |
diff --git a/OpenSim/Framework/Tests/AssetBaseTest.cs b/OpenSim/Framework/Tests/AssetBaseTest.cs index 6db1aa0..25d2393 100644 --- a/OpenSim/Framework/Tests/AssetBaseTest.cs +++ b/OpenSim/Framework/Tests/AssetBaseTest.cs | |||
@@ -30,11 +30,12 @@ using System.Collections.Generic; | |||
30 | using System.Text; | 30 | using System.Text; |
31 | using NUnit.Framework; | 31 | using NUnit.Framework; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Tests.Common; | ||
33 | 34 | ||
34 | namespace OpenSim.Framework.Tests | 35 | namespace OpenSim.Framework.Tests |
35 | { | 36 | { |
36 | [TestFixture] | 37 | [TestFixture] |
37 | public class AssetBaseTest | 38 | public class AssetBaseTest : OpenSimTestCase |
38 | { | 39 | { |
39 | [Test] | 40 | [Test] |
40 | public void TestContainsReferences() | 41 | public void TestContainsReferences() |
diff --git a/OpenSim/Framework/Tests/CacheTests.cs b/OpenSim/Framework/Tests/CacheTests.cs index c3613e6..c709860 100644 --- a/OpenSim/Framework/Tests/CacheTests.cs +++ b/OpenSim/Framework/Tests/CacheTests.cs | |||
@@ -28,11 +28,12 @@ | |||
28 | using System; | 28 | using System; |
29 | using NUnit.Framework; | 29 | using NUnit.Framework; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Tests.Common; | ||
31 | 32 | ||
32 | namespace OpenSim.Framework.Tests | 33 | namespace OpenSim.Framework.Tests |
33 | { | 34 | { |
34 | [TestFixture] | 35 | [TestFixture] |
35 | public class CacheTests | 36 | public class CacheTests : OpenSimTestCase |
36 | { | 37 | { |
37 | private Cache cache; | 38 | private Cache cache; |
38 | private UUID cacheItemUUID; | 39 | private UUID cacheItemUUID; |
diff --git a/OpenSim/Framework/Tests/LocationTest.cs b/OpenSim/Framework/Tests/LocationTest.cs index 2707afa..a56ecb4 100644 --- a/OpenSim/Framework/Tests/LocationTest.cs +++ b/OpenSim/Framework/Tests/LocationTest.cs | |||
@@ -26,11 +26,12 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using NUnit.Framework; | 28 | using NUnit.Framework; |
29 | using OpenSim.Tests.Common; | ||
29 | 30 | ||
30 | namespace OpenSim.Framework.Tests | 31 | namespace OpenSim.Framework.Tests |
31 | { | 32 | { |
32 | [TestFixture] | 33 | [TestFixture] |
33 | public class LocationTest | 34 | public class LocationTest : OpenSimTestCase |
34 | { | 35 | { |
35 | [Test] | 36 | [Test] |
36 | public void locationRegionHandleRegionHandle() | 37 | public void locationRegionHandleRegionHandle() |
diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs index 6fde488..a933ae0 100644 --- a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs +++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs | |||
@@ -32,11 +32,12 @@ using OpenMetaverse.StructuredData; | |||
32 | using System; | 32 | using System; |
33 | using System.Globalization; | 33 | using System.Globalization; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using OpenSim.Tests.Common; | ||
35 | 36 | ||
36 | namespace OpenSim.Framework.Tests | 37 | namespace OpenSim.Framework.Tests |
37 | { | 38 | { |
38 | [TestFixture] | 39 | [TestFixture] |
39 | public class MundaneFrameworkTests | 40 | public class MundaneFrameworkTests : OpenSimTestCase |
40 | { | 41 | { |
41 | private bool m_RegionSettingsOnSaveEventFired; | 42 | private bool m_RegionSettingsOnSaveEventFired; |
42 | private bool m_RegionLightShareDataOnSaveEventFired; | 43 | private bool m_RegionLightShareDataOnSaveEventFired; |
diff --git a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs index 36bc6e7..82e13e5 100644 --- a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs +++ b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs | |||
@@ -31,11 +31,12 @@ using NUnit.Framework; | |||
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenMetaverse.StructuredData; | 32 | using OpenMetaverse.StructuredData; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Tests.Common; | ||
34 | 35 | ||
35 | namespace OpenSim.Framework.Tests | 36 | namespace OpenSim.Framework.Tests |
36 | { | 37 | { |
37 | [TestFixture] | 38 | [TestFixture] |
38 | public class PrimeNumberHelperTests | 39 | public class PrimeNumberHelperTests : OpenSimTestCase |
39 | { | 40 | { |
40 | [Test] | 41 | [Test] |
41 | public void TestGetPrime() | 42 | public void TestGetPrime() |
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index f0d2a3f..11ca068 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs | |||
@@ -33,7 +33,7 @@ using OpenSim.Tests.Common; | |||
33 | namespace OpenSim.Framework.Tests | 33 | namespace OpenSim.Framework.Tests |
34 | { | 34 | { |
35 | [TestFixture] | 35 | [TestFixture] |
36 | public class UtilTests | 36 | public class UtilTests : OpenSimTestCase |
37 | { | 37 | { |
38 | [Test] | 38 | [Test] |
39 | public void VectorOperationTests() | 39 | public void VectorOperationTests() |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index e76a37b..7d88604 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1753,12 +1753,16 @@ namespace OpenSim.Framework | |||
1753 | StringBuilder sb = new StringBuilder(); | 1753 | StringBuilder sb = new StringBuilder(); |
1754 | if (FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) | 1754 | if (FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) |
1755 | { | 1755 | { |
1756 | threadPoolUsed = "SmartThreadPool"; | 1756 | // ROBUST currently leaves this the FireAndForgetMethod but never actually initializes the threadpool. |
1757 | maxThreads = m_ThreadPool.MaxThreads; | 1757 | if (m_ThreadPool != null) |
1758 | minThreads = m_ThreadPool.MinThreads; | 1758 | { |
1759 | inUseThreads = m_ThreadPool.InUseThreads; | 1759 | threadPoolUsed = "SmartThreadPool"; |
1760 | allocatedThreads = m_ThreadPool.ActiveThreads; | 1760 | maxThreads = m_ThreadPool.MaxThreads; |
1761 | waitingCallbacks = m_ThreadPool.WaitingCallbacks; | 1761 | minThreads = m_ThreadPool.MinThreads; |
1762 | inUseThreads = m_ThreadPool.InUseThreads; | ||
1763 | allocatedThreads = m_ThreadPool.ActiveThreads; | ||
1764 | waitingCallbacks = m_ThreadPool.WaitingCallbacks; | ||
1765 | } | ||
1762 | } | 1766 | } |
1763 | else if ( | 1767 | else if ( |
1764 | FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem | 1768 | FireAndForgetMethod == FireAndForgetMethod.UnsafeQueueUserWorkItem |