aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs1
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs57
3 files changed, 51 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 99064c8..2f947fd 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1341,7 +1341,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1341 1341
1342 string reason = String.Empty; 1342 string reason = String.Empty;
1343 1343
1344
1345 bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); 1344 bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason);
1346 1345
1347 if (regionAccepted && newAgent) 1346 if (regionAccepted && newAgent)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
index cd7d6bc..b286d17 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
@@ -31,11 +31,10 @@ using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Threading; 32using System.Threading;
33using log4net.Config; 33using log4net.Config;
34using Nini.Config;
34using NUnit.Framework; 35using NUnit.Framework;
35using OpenMetaverse; 36using OpenMetaverse;
36using OpenSim.Framework; 37using OpenSim.Framework;
37using Nini.Config;
38
39using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid; 38using OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid;
40using OpenSim.Region.Framework.Scenes; 39using OpenSim.Region.Framework.Scenes;
41using GridRegion = OpenSim.Services.Interfaces.GridRegion; 40using GridRegion = OpenSim.Services.Interfaces.GridRegion;
@@ -69,6 +68,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
69 [Test] 68 [Test]
70 public void TestRegisterRegion() 69 public void TestRegisterRegion()
71 { 70 {
71 TestHelpers.InMethod();
72// log4net.Config.XmlConfigurator.Configure();
73
72 SetUp(); 74 SetUp();
73 75
74 // Create 4 regions 76 // Create 4 regions
@@ -191,7 +193,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
191 results = m_LocalConnector.GetHyperlinks(UUID.Zero); 193 results = m_LocalConnector.GetHyperlinks(UUID.Zero);
192 Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); 194 Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null");
193 Assert.That(results.Count, Is.EqualTo(0), "Retrieved linked regions collection is not the number expected"); 195 Assert.That(results.Count, Is.EqualTo(0), "Retrieved linked regions collection is not the number expected");
194
195 } 196 }
196 } 197 }
197} 198} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index 57d22bd..f479e12 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -31,7 +31,7 @@ using System.Reflection;
31using System.Text; 31using System.Text;
32using System.Threading; 32using System.Threading;
33using System.Timers; 33using System.Timers;
34using Timer=System.Timers.Timer; 34using Timer = System.Timers.Timer;
35using Nini.Config; 35using Nini.Config;
36using NUnit.Framework; 36using NUnit.Framework;
37using OpenMetaverse; 37using OpenMetaverse;
@@ -39,11 +39,13 @@ using OpenSim.Framework;
39using OpenSim.Framework.Communications; 39using OpenSim.Framework.Communications;
40using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
41using OpenSim.Region.Framework.Interfaces; 41using OpenSim.Region.Framework.Interfaces;
42using OpenSim.Region.ClientStack.Linden;
42using OpenSim.Region.CoreModules.Framework.EntityTransfer; 43using OpenSim.Region.CoreModules.Framework.EntityTransfer;
43using OpenSim.Region.CoreModules.World.Serialiser; 44using OpenSim.Region.CoreModules.World.Serialiser;
44using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; 45using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
45using OpenSim.Tests.Common; 46using OpenSim.Tests.Common;
46using OpenSim.Tests.Common.Mock; 47using OpenSim.Tests.Common.Mock;
48using GridRegion = OpenSim.Services.Interfaces.GridRegion;
47 49
48namespace OpenSim.Region.Framework.Scenes.Tests 50namespace OpenSim.Region.Framework.Scenes.Tests
49{ 51{
@@ -112,14 +114,40 @@ namespace OpenSim.Region.Framework.Scenes.Tests
112 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(0)); 114 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(0));
113 } 115 }
114 116
117 [Test]
118 public void TestCreateChildScenePresence()
119 {
120 TestHelpers.InMethod();
121// log4net.Config.XmlConfigurator.Configure();
122
123 LocalSimulationConnectorModule lsc = new LocalSimulationConnectorModule();
124
125 IConfigSource configSource = new IniConfigSource();
126 IConfig config = configSource.AddConfig("Modules");
127 config.Set("SimulationServices", "LocalSimulationConnectorModule");
128
129 TestScene scene = SceneHelpers.SetupScene();
130 SceneHelpers.SetupSceneModules(scene, configSource, lsc);
131
132 UUID agentId = TestHelpers.ParseTail(0x01);
133 AgentCircuitData acd = SceneHelpers.GenerateAgentData(agentId);
134
135 GridRegion region = scene.GridService.GetRegionByName(UUID.Zero, scene.RegionInfo.RegionName);
136 string reason;
137 scene.SimulationService.CreateAgent(region, acd, (uint)TeleportFlags.ViaLogin, out reason);
138
139 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(agentId), Is.Not.Null);
140 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
141 }
142
115 /// <summary> 143 /// <summary>
116 /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region 144 /// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
117 /// </summary> 145 /// </summary>
118 /// <remarks> 146 /// <remarks>
119 /// Please note that unlike the other tests here, this doesn't rely on structures 147 /// Please note that unlike the other tests here, this doesn't rely on anything set up in the instance fields.
120 /// </remarks> 148 /// </remarks>
121 [Test] 149 [Test]
122 public void TestChildAgentEstablished() 150 public void TestChildAgentEstablishedInNeighbour()
123 { 151 {
124 TestHelpers.InMethod(); 152 TestHelpers.InMethod();
125// log4net.Config.XmlConfigurator.Configure(); 153// log4net.Config.XmlConfigurator.Configure();
@@ -127,18 +155,25 @@ namespace OpenSim.Region.Framework.Scenes.Tests
127 UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); 155 UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
128 156
129 TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000); 157 TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
130// TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); 158 TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
131 159
132 IConfigSource configSource = new IniConfigSource(); 160 IConfigSource configSource = new IniConfigSource();
133 configSource.AddConfig("Modules").Set("EntityTransferModule", "BasicEntityTransferModule"); 161 IConfig config = configSource.AddConfig("Startup");
162 config.Set("serverside_object_permissions", true);
163 config.Set("EventQueue", true);
164
134 EntityTransferModule etm = new EntityTransferModule(); 165 EntityTransferModule etm = new EntityTransferModule();
166
167 EventQueueGetModule eqgm1 = new EventQueueGetModule();
168 SceneHelpers.SetupSceneModules(myScene1, configSource, etm, eqgm1);
169
170 EventQueueGetModule eqgm2 = new EventQueueGetModule();
171 SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2);
135 172
136 SceneHelpers.SetupSceneModules(myScene1, configSource, etm); 173// SceneHelpers.AddScenePresence(myScene1, agent1Id);
137
138 SceneHelpers.AddScenePresence(myScene1, agent1Id);
139// ScenePresence childPresence = myScene2.GetScenePresence(agent1); 174// ScenePresence childPresence = myScene2.GetScenePresence(agent1);
140 175//
141 // TODO: Need to do a fair amount of work to allow synchronous establishment of child agents 176// // TODO: Need to do a fair amount of work to allow synchronous establishment of child agents
142// Assert.That(childPresence, Is.Not.Null); 177// Assert.That(childPresence, Is.Not.Null);
143// Assert.That(childPresence.IsChildAgent, Is.True); 178// Assert.That(childPresence.IsChildAgent, Is.True);
144 } 179 }