aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-11 21:55:18 +0100
committerJustin Clark-Casey (justincc)2012-07-11 21:55:18 +0100
commit33cff9b9d7c9d742b1cb7064ed78677e3f030e72 (patch)
tree2dafeb5ce7cfe0daba2ccfa35f2e3662c8c8742c
parentRemove WorldComm module from the regression TestCompileAndStartScript() since... (diff)
downloadopensim-SC_OLD-33cff9b9d7c9d742b1cb7064ed78677e3f030e72.zip
opensim-SC_OLD-33cff9b9d7c9d742b1cb7064ed78677e3f030e72.tar.gz
opensim-SC_OLD-33cff9b9d7c9d742b1cb7064ed78677e3f030e72.tar.bz2
opensim-SC_OLD-33cff9b9d7c9d742b1cb7064ed78677e3f030e72.tar.xz
Allow XEngine StartDelay to be configured in the [XEngine] config section.
This is only currently meant for use by regression tests that don't have any issues if XEngine is started up quickly, since no other operations will be occuring simultaneously. Therefore, this is not yet documented externally.
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs11
3 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 81e889d..b021a47 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -135,6 +135,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
135 135
136 IConfig xEngineConfig = config.AddConfig("XEngine"); 136 IConfig xEngineConfig = config.AddConfig("XEngine");
137 xEngineConfig.Set("Enabled", "true"); 137 xEngineConfig.Set("Enabled", "true");
138 xEngineConfig.Set("StartDelay", "0");
138 139
139 // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call 140 // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call
140 // to AssemblyResolver.OnAssemblyResolve fails. 141 // to AssemblyResolver.OnAssemblyResolve fails.
@@ -371,7 +372,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
371 public void TestDetachScriptedAttachmentToInventory() 372 public void TestDetachScriptedAttachmentToInventory()
372 { 373 {
373 TestHelpers.InMethod(); 374 TestHelpers.InMethod();
374 TestHelpers.EnableLogging(); 375// TestHelpers.EnableLogging();
375 376
376 Scene scene = CreateScriptingEnabledTestScene(); 377 Scene scene = CreateScriptingEnabledTestScene();
377 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene, 0x1); 378 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene, 0x1);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs
index fe4b0fa..f247a0b 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
65 65
66 IConfig xEngineConfig = configSource.AddConfig("XEngine"); 66 IConfig xEngineConfig = configSource.AddConfig("XEngine");
67 xEngineConfig.Set("Enabled", "true"); 67 xEngineConfig.Set("Enabled", "true");
68 xEngineConfig.Set("StartDelay", "0");
68 69
69 // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call 70 // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call
70 // to AssemblyResolver.OnAssemblyResolve fails. 71 // to AssemblyResolver.OnAssemblyResolve fails.
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index e07ae1c..f768cf2 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -77,7 +77,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
77 private IConfigSource m_ConfigSource = null; 77 private IConfigSource m_ConfigSource = null;
78 private ICompiler m_Compiler; 78 private ICompiler m_Compiler;
79 private int m_MinThreads; 79 private int m_MinThreads;
80 private int m_MaxThreads ; 80 private int m_MaxThreads;
81
82 /// <summary>
83 /// Amount of time to delay before starting.
84 /// </summary>
85 private int m_StartDelay;
86
81 private int m_IdleTimeout; 87 private int m_IdleTimeout;
82 private int m_StackSize; 88 private int m_StackSize;
83 private int m_SleepTime; 89 private int m_SleepTime;
@@ -231,6 +237,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
231 m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100); 237 m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100);
232 m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60); 238 m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60);
233 string priority = m_ScriptConfig.GetString("Priority", "BelowNormal"); 239 string priority = m_ScriptConfig.GetString("Priority", "BelowNormal");
240 m_StartDelay = m_ScriptConfig.GetInt("StartDelay", 15000);
234 m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); 241 m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300);
235 m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); 242 m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144);
236 m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000; 243 m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000;
@@ -886,7 +893,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
886 { 893 {
887 // This delay exists to stop mono problems where script compilation and startup would stop the sim 894 // This delay exists to stop mono problems where script compilation and startup would stop the sim
888 // working properly for the session. 895 // working properly for the session.
889 System.Threading.Thread.Sleep(15000); 896 System.Threading.Thread.Sleep(m_StartDelay);
890 } 897 }
891 898
892 object[] o; 899 object[] o;