aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-06 02:27:25 +0100
committerJustin Clark-Casey (justincc)2011-08-06 02:27:25 +0100
commite37f8cf90270ba6e1605bdb528ca205a35cfe049 (patch)
tree0385ec13b0b467bb7e367c283ba11cac8520bd90 /OpenSim
parentrefactor: Change SceneHelpers.AddClient() to AddScenePresence(). (diff)
downloadopensim-SC_OLD-e37f8cf90270ba6e1605bdb528ca205a35cfe049.zip
opensim-SC_OLD-e37f8cf90270ba6e1605bdb528ca205a35cfe049.tar.gz
opensim-SC_OLD-e37f8cf90270ba6e1605bdb528ca205a35cfe049.tar.bz2
opensim-SC_OLD-e37f8cf90270ba6e1605bdb528ca205a35cfe049.tar.xz
Add a test to check that ScenePresence and circuit go away when a root agent is closed down
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs27
1 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 73acf28..6cf905a 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -93,15 +93,22 @@ namespace OpenSim.Region.Framework.Scenes.Tests
93 region3 = scene3.RegionInfo.RegionHandle; 93 region3 = scene3.RegionInfo.RegionHandle;
94 } 94 }
95 95
96// [Test] 96 [Test]
97// public void TestLogout() 97 public void TestCloseAgent()
98// { 98 {
99// TestHelpers.InMethod(); 99 TestHelpers.InMethod();
100//// log4net.Config.XmlConfigurator.Configure(); 100// log4net.Config.XmlConfigurator.Configure();
101// 101
102// TestScene scene = SceneHelpers.SetupScene(); 102 TestScene scene = SceneHelpers.SetupScene();
103// SceneHelpers. 103 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
104// } 104
105 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Not.Null);
106
107 scene.IncomingCloseAgent(sp.UUID);
108
109 Assert.That(scene.GetScenePresence(sp.UUID), Is.Null);
110 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null);
111 }
105 112
106 /// <summary> 113 /// <summary>
107 /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region 114 /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
@@ -118,7 +125,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
118 UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); 125 UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
119 126
120 TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000); 127 TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
121// TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); 128// TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
122 129
123 IConfigSource configSource = new IniConfigSource(); 130 IConfigSource configSource = new IniConfigSource();
124 configSource.AddConfig("Modules").Set("EntityTransferModule", "BasicEntityTransferModule"); 131 configSource.AddConfig("Modules").Set("EntityTransferModule", "BasicEntityTransferModule");