aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-14 18:49:45 +0000
committerJustin Clarke Casey2009-04-14 18:49:45 +0000
commitd0744f8eca6adc2b6ae257f581792bd8eae16ea2 (patch)
treec6fe087005bb4d1a0ccf7ded71b611cec721a817 /OpenSim/Tests/Common/Setup
parentFix for minor bug introduced yesterday, HG only. Can't lookup the profile whe... (diff)
downloadopensim-SC_OLD-d0744f8eca6adc2b6ae257f581792bd8eae16ea2.zip
opensim-SC_OLD-d0744f8eca6adc2b6ae257f581792bd8eae16ea2.tar.gz
opensim-SC_OLD-d0744f8eca6adc2b6ae257f581792bd8eae16ea2.tar.bz2
opensim-SC_OLD-d0744f8eca6adc2b6ae257f581792bd8eae16ea2.tar.xz
* Make archiver tests pump the asset server manually instead of starting the normal runtime thread
* This may eliminate the occasional archive test freezes, since they appeared to occur when somehow the asset server didn't pick up on the presence of a request in the asset quque
Diffstat (limited to 'OpenSim/Tests/Common/Setup')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs38
1 files changed, 36 insertions, 2 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 3bcd949..ea4f0af 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -52,10 +52,39 @@ namespace OpenSim.Tests.Common.Setup
52 /// <summary> 52 /// <summary>
53 /// Set up a test scene 53 /// Set up a test scene
54 /// </summary> 54 /// </summary>
55 ///
56 /// Automatically starts service threads, as would the normal runtime.
57 ///
55 /// <returns></returns> 58 /// <returns></returns>
56 public static TestScene SetupScene() 59 public static TestScene SetupScene()
57 { 60 {
58 return SetupScene("Unit test region", UUID.Random(), 1000, 1000, new TestCommunicationsManager()); 61 return SetupScene(true);
62 }
63
64 /// <summary>
65 /// Set up a test scene
66 /// </summary>
67 ///
68 /// <param name="startServices">Start associated service threads for the scene</param>
69 /// <returns></returns>
70 public static TestScene SetupScene(bool startServices)
71 {
72 return SetupScene(
73 "Unit test region", UUID.Random(), 1000, 1000, new TestCommunicationsManager(), startServices);
74 }
75
76 /// <summary>
77 /// Set up a test scene
78 /// </summary>
79 /// <param name="name">Name of the region</param>
80 /// <param name="id">ID of the region</param>
81 /// <param name="x">X co-ordinate of the region</param>
82 /// <param name="y">Y co-ordinate of the region</param>
83 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
84 /// <returns></returns>
85 public static TestScene SetupScene(string name, UUID id, uint x, uint y, TestCommunicationsManager cm)
86 {
87 return SetupScene(name, id, x, y, cm, true);
59 } 88 }
60 89
61 /// <summary> 90 /// <summary>
@@ -66,8 +95,10 @@ namespace OpenSim.Tests.Common.Setup
66 /// <param name="x">X co-ordinate of the region</param> 95 /// <param name="x">X co-ordinate of the region</param>
67 /// <param name="y">Y co-ordinate of the region</param> 96 /// <param name="y">Y co-ordinate of the region</param>
68 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 97 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
98 /// <param name="startServices">Start associated threads for the services used by the scene</param>
69 /// <returns></returns> 99 /// <returns></returns>
70 public static TestScene SetupScene(string name, UUID id, uint x, uint y, CommunicationsManager cm) 100 public static TestScene SetupScene(
101 string name, UUID id, uint x, uint y, TestCommunicationsManager cm, bool startServices)
71 { 102 {
72 Console.WriteLine("Setting up test scene {0}", name); 103 Console.WriteLine("Setting up test scene {0}", name);
73 104
@@ -102,6 +133,9 @@ namespace OpenSim.Tests.Common.Setup
102 testScene.PhysicsScene 133 testScene.PhysicsScene
103 = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", configSource, "test"); 134 = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", configSource, "test");
104 135
136 if (startServices)
137 cm.StartServices();
138
105 return testScene; 139 return testScene;
106 } 140 }
107 141