aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
diff options
context:
space:
mode:
authorDan Lake2011-10-06 22:47:33 -0700
committerDan Lake2011-10-06 22:47:33 -0700
commit4748c19bdbcdcaf6050e1f04a5f7394a88e0bf3e (patch)
treedc2b8f85bebe216378d54dab9410f0a8805145cf /OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-4748c19bdbcdcaf6050e1f04a5f7394a88e0bf3e.zip
opensim-SC-4748c19bdbcdcaf6050e1f04a5f7394a88e0bf3e.tar.gz
opensim-SC-4748c19bdbcdcaf6050e1f04a5f7394a88e0bf3e.tar.bz2
opensim-SC-4748c19bdbcdcaf6050e1f04a5f7394a88e0bf3e.tar.xz
Refactored "known child region" in ScenePresence. There were 4 different
ways to access the list/dictionary of child regions and locking was inconsistent. There are now public properties which enforce locks. Callers are no longer required to create new copies of lists.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index ce9d418..119eb1f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -215,11 +215,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
215 string cap = presence.ControllingClient.RequestClientInfo().CapsPath; 215 string cap = presence.ControllingClient.RequestClientInfo().CapsPath;
216 216
217 presence.AddNeighbourRegion(region2, cap); 217 presence.AddNeighbourRegion(region2, cap);
218 presence.AddNeighbourRegion(region3, cap); 218 presence.AddNeighbourRegion(region3, cap);
219 219
220 List<ulong> neighbours = presence.GetKnownRegionList(); 220 Assert.That(presence.KnownRegionCount, Is.EqualTo(2));
221
222 Assert.That(neighbours.Count, Is.EqualTo(2));
223 } 221 }
224 222
225 [Test] 223 [Test]
@@ -230,8 +228,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
230 ScenePresence presence = scene.GetScenePresence(agent1); 228 ScenePresence presence = scene.GetScenePresence(agent1);
231 presence.RemoveNeighbourRegion(region3); 229 presence.RemoveNeighbourRegion(region3);
232 230
233 List<ulong> neighbours = presence.GetKnownRegionList(); 231 Assert.That(presence.KnownRegionCount,Is.EqualTo(1));
234 Assert.That(neighbours.Count,Is.EqualTo(1));
235 /* 232 /*
236 presence.MakeChildAgent; 233 presence.MakeChildAgent;
237 presence.MakeRootAgent; 234 presence.MakeRootAgent;