aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
diff options
context:
space:
mode:
authordiva2009-02-12 23:23:44 +0000
committerdiva2009-02-12 23:23:44 +0000
commit7a274a7e1dfa651c17cb33ca1994f321ccddc005 (patch)
tree2864e53e24a97c3d77a83f2b2d852bf1119415d9 /OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
parent* Make it possible to load and save inventory archives while a user is not lo... (diff)
downloadopensim-SC_OLD-7a274a7e1dfa651c17cb33ca1994f321ccddc005.zip
opensim-SC_OLD-7a274a7e1dfa651c17cb33ca1994f321ccddc005.tar.gz
opensim-SC_OLD-7a274a7e1dfa651c17cb33ca1994f321ccddc005.tar.bz2
opensim-SC_OLD-7a274a7e1dfa651c17cb33ca1994f321ccddc005.tar.xz
Makes region crossings asynchronous. Moved the bulk of the original code out of ScenePresence and into SceneCommunicationService, where it should be (next to RequestTeleportToLocation). No changes in the crossing mechanism itself, yet. But this change opens the way to doing crossings as slowly as it needs to be, outside the simulator Update loop.
Note: weirdnesses may occur!
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
index db88878..2f2bc19 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs
@@ -66,11 +66,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000, cm); 66 scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000, cm);
67 scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000, cm); 67 scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000, cm);
68 68
69 IRegionModule interregionComms = new RESTInterregionComms(); 69 IRegionModule interregionComms = new RESTInterregionComms();
70 interregionComms.Initialise(scene, new IniConfigSource()); 70 interregionComms.Initialise(scene, new IniConfigSource());
71 interregionComms.Initialise(scene2, new IniConfigSource()); 71 interregionComms.Initialise(scene2, new IniConfigSource());
72 interregionComms.Initialise(scene3, new IniConfigSource()); 72 interregionComms.Initialise(scene3, new IniConfigSource());
73 interregionComms.PostInitialise(); 73 interregionComms.PostInitialise();
74 SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms); 74 SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms);
75 SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms); 75 SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms);
76 SceneSetupHelpers.SetupSceneModules(scene3, new IniConfigSource(), interregionComms); 76 SceneSetupHelpers.SetupSceneModules(scene3, new IniConfigSource(), interregionComms);
@@ -203,6 +203,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
203 scene.RegisterRegionWithGrid(); 203 scene.RegisterRegionWithGrid();
204 scene2.RegisterRegionWithGrid(); 204 scene2.RegisterRegionWithGrid();
205 presence.Update(); 205 presence.Update();
206 // Crossings are asynchronous
207 while (presence.IsInTransit) { } ;
206 208
207 Assert.That(presence.IsChildAgent, Is.True, "Did not complete region cross as expected."); 209 Assert.That(presence.IsChildAgent, Is.True, "Did not complete region cross as expected.");
208 Assert.That(presence2.IsChildAgent, Is.False, "Did not receive root status after receiving agent."); 210 Assert.That(presence2.IsChildAgent, Is.False, "Did not receive root status after receiving agent.");
@@ -210,6 +212,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
210 // Cross Back 212 // Cross Back
211 presence2.AbsolutePosition = new Vector3(-1, 3, 100); 213 presence2.AbsolutePosition = new Vector3(-1, 3, 100);
212 presence2.Update(); 214 presence2.Update();
215 // Crossings are asynchronous
216 while (presence.IsInTransit) { };
213 217
214 Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected."); 218 Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected.");
215 Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again."); 219 Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");