diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
5 files changed, 204 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 52ad538..d670dad 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -33,7 +33,9 @@ using NUnit.Framework; | |||
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
36 | using OpenSim.Region.CoreModules.Framework.EntityTransfer; | ||
36 | using OpenSim.Region.CoreModules.Framework.InventoryAccess; | 37 | using OpenSim.Region.CoreModules.Framework.InventoryAccess; |
38 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; | ||
37 | using OpenSim.Region.CoreModules.World.Permissions; | 39 | using OpenSim.Region.CoreModules.World.Permissions; |
38 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
39 | using OpenSim.Services.Interfaces; | 41 | using OpenSim.Services.Interfaces; |
@@ -52,6 +54,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
52 | [TestFixture] | 54 | [TestFixture] |
53 | public class SceneObjectDeRezTests : OpenSimTestCase | 55 | public class SceneObjectDeRezTests : OpenSimTestCase |
54 | { | 56 | { |
57 | [TestFixtureSetUp] | ||
58 | public void FixtureInit() | ||
59 | { | ||
60 | // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. | ||
61 | // This facility was added after the original async delete tests were written, so it may be possible now | ||
62 | // to not bother explicitly disabling their async (since everything will be running sync). | ||
63 | Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest; | ||
64 | } | ||
65 | |||
66 | [TestFixtureTearDown] | ||
67 | public void TearDown() | ||
68 | { | ||
69 | // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple | ||
70 | // threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression | ||
71 | // tests really shouldn't). | ||
72 | Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; | ||
73 | } | ||
74 | |||
55 | /// <summary> | 75 | /// <summary> |
56 | /// Test deleting an object from a scene. | 76 | /// Test deleting an object from a scene. |
57 | /// </summary> | 77 | /// </summary> |
@@ -59,46 +79,96 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
59 | public void TestDeRezSceneObject() | 79 | public void TestDeRezSceneObject() |
60 | { | 80 | { |
61 | TestHelpers.InMethod(); | 81 | TestHelpers.InMethod(); |
62 | // log4net.Config.XmlConfigurator.Configure(); | ||
63 | 82 | ||
64 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 83 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
65 | 84 | ||
66 | TestScene scene = new SceneHelpers().SetupScene(); | 85 | TestScene scene = new SceneHelpers().SetupScene(); |
67 | IConfigSource configSource = new IniConfigSource(); | 86 | SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); |
68 | IConfig config = configSource.AddConfig("Startup"); | 87 | TestClient client = (TestClient)SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
69 | config.Set("serverside_object_permissions", true); | ||
70 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); | ||
71 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | ||
72 | 88 | ||
73 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 89 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
74 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 90 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
75 | sogd.Enabled = false; | 91 | sogd.Enabled = false; |
76 | 92 | ||
77 | SceneObjectPart part | 93 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); |
78 | = new SceneObjectPart(userId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); | 94 | uint soLocalId = so.LocalId; |
79 | part.Name = "obj1"; | ||
80 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | ||
81 | 95 | ||
82 | List<uint> localIds = new List<uint>(); | 96 | List<uint> localIds = new List<uint>(); |
83 | localIds.Add(part.LocalId); | 97 | localIds.Add(so.LocalId); |
84 | scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); | 98 | scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); |
85 | 99 | ||
86 | // Check that object isn't deleted until we crank the sogd handle. | 100 | // Check that object isn't deleted until we crank the sogd handle. |
87 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 101 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId); |
88 | Assert.That(retrievedPart, Is.Not.Null); | 102 | Assert.That(retrievedPart, Is.Not.Null); |
89 | Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); | 103 | Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); |
90 | 104 | ||
91 | sogd.InventoryDeQueueAndDelete(); | 105 | sogd.InventoryDeQueueAndDelete(); |
92 | 106 | ||
93 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId); | 107 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); |
94 | Assert.That(retrievedPart2, Is.Null); | 108 | Assert.That(retrievedPart2, Is.Null); |
109 | |||
110 | Assert.That(client.ReceivedKills.Count, Is.EqualTo(1)); | ||
111 | Assert.That(client.ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
112 | } | ||
113 | |||
114 | /// <summary> | ||
115 | /// Test that child and root agents correctly receive KillObject notifications. | ||
116 | /// </summary> | ||
117 | [Test] | ||
118 | public void TestDeRezSceneObjectToAgents() | ||
119 | { | ||
120 | TestHelpers.InMethod(); | ||
121 | // TestHelpers.EnableLogging(); | ||
122 | |||
123 | SceneHelpers sh = new SceneHelpers(); | ||
124 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); | ||
125 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1000, 999); | ||
126 | |||
127 | // We need this so that the creation of the root client for userB in sceneB can trigger the creation of a child client in sceneA | ||
128 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); | ||
129 | EntityTransferModule etmB = new EntityTransferModule(); | ||
130 | IConfigSource config = new IniConfigSource(); | ||
131 | IConfig modulesConfig = config.AddConfig("Modules"); | ||
132 | modulesConfig.Set("EntityTransferModule", etmB.Name); | ||
133 | modulesConfig.Set("SimulationServices", lscm.Name); | ||
134 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | ||
135 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); | ||
136 | |||
137 | // We need this for derez | ||
138 | SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule()); | ||
139 | |||
140 | UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, ""); | ||
141 | UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, ""); | ||
142 | |||
143 | TestClient clientA = (TestClient)SceneHelpers.AddScenePresence(sceneA, uaA).ControllingClient; | ||
144 | |||
145 | // This is the more long-winded route we have to take to get a child client created for userB in sceneA | ||
146 | // rather than just calling AddScenePresence() as for userA | ||
147 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(uaB); | ||
148 | TestClient clientB = new TestClient(acd, sceneB); | ||
149 | List<TestClient> childClientsB = new List<TestClient>(); | ||
150 | EntityTransferHelpers.SetUpInformClientOfNeighbour(clientB, childClientsB); | ||
151 | |||
152 | SceneHelpers.AddScenePresence(sceneB, clientB, acd); | ||
153 | |||
154 | SceneObjectGroup so = SceneHelpers.AddSceneObject(sceneA); | ||
155 | uint soLocalId = so.LocalId; | ||
156 | |||
157 | sceneA.DeleteSceneObject(so, false); | ||
158 | |||
159 | Assert.That(clientA.ReceivedKills.Count, Is.EqualTo(1)); | ||
160 | Assert.That(clientA.ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
161 | |||
162 | Assert.That(childClientsB[0].ReceivedKills.Count, Is.EqualTo(1)); | ||
163 | Assert.That(childClientsB[0].ReceivedKills[0], Is.EqualTo(soLocalId)); | ||
95 | } | 164 | } |
96 | 165 | ||
97 | /// <summary> | 166 | /// <summary> |
98 | /// Test deleting an object from a scene where the deleter is not the owner | 167 | /// Test deleting an object from a scene where the deleter is not the owner |
99 | /// </summary> | 168 | /// </summary> |
100 | /// | 169 | /// <remarks> |
101 | /// This test assumes that the deleter is not a god. | 170 | /// This test assumes that the deleter is not a god. |
171 | /// </remarks> | ||
102 | [Test] | 172 | [Test] |
103 | public void TestDeRezSceneObjectNotOwner() | 173 | public void TestDeRezSceneObjectNotOwner() |
104 | { | 174 | { |
@@ -109,10 +179,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
109 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); | 179 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); |
110 | 180 | ||
111 | TestScene scene = new SceneHelpers().SetupScene(); | 181 | TestScene scene = new SceneHelpers().SetupScene(); |
112 | IConfigSource configSource = new IniConfigSource(); | 182 | SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); |
113 | IConfig config = configSource.AddConfig("Startup"); | ||
114 | config.Set("serverside_object_permissions", true); | ||
115 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); | ||
116 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 183 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
117 | 184 | ||
118 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 185 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index bbfbbfc..bbe34d2 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | |||
@@ -119,7 +119,20 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
119 | 119 | ||
120 | UUID spUuid = TestHelpers.ParseTail(0x1); | 120 | UUID spUuid = TestHelpers.ParseTail(0x1); |
121 | 121 | ||
122 | // The etm is only invoked by this test to check whether an agent is still in transit if there is a dupe | ||
123 | EntityTransferModule etm = new EntityTransferModule(); | ||
124 | |||
125 | IConfigSource config = new IniConfigSource(); | ||
126 | IConfig modulesConfig = config.AddConfig("Modules"); | ||
127 | modulesConfig.Set("EntityTransferModule", etm.Name); | ||
128 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); | ||
129 | |||
130 | // In order to run a single threaded regression test we do not want the entity transfer module waiting | ||
131 | // for a callback from the destination scene before removing its avatar data. | ||
132 | entityTransferConfig.Set("wait_for_callback", false); | ||
133 | |||
122 | TestScene scene = new SceneHelpers().SetupScene(); | 134 | TestScene scene = new SceneHelpers().SetupScene(); |
135 | SceneHelpers.SetupSceneModules(scene, config, etm); | ||
123 | SceneHelpers.AddScenePresence(scene, spUuid); | 136 | SceneHelpers.AddScenePresence(scene, spUuid); |
124 | SceneHelpers.AddScenePresence(scene, spUuid); | 137 | SceneHelpers.AddScenePresence(scene, spUuid); |
125 | 138 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs new file mode 100644 index 0000000..4ae7a8e --- /dev/null +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using System.Text; | ||
32 | using System.Threading; | ||
33 | using System.Timers; | ||
34 | using Timer = System.Timers.Timer; | ||
35 | using Nini.Config; | ||
36 | using NUnit.Framework; | ||
37 | using OpenMetaverse; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Framework.Communications; | ||
40 | using OpenSim.Framework.Servers; | ||
41 | using OpenSim.Framework.Servers.HttpServer; | ||
42 | using OpenSim.Region.ClientStack.Linden; | ||
43 | using OpenSim.Region.CoreModules.Framework; | ||
44 | using OpenSim.Region.CoreModules.Framework.EntityTransfer; | ||
45 | using OpenSim.Region.CoreModules.World.Serialiser; | ||
46 | using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; | ||
47 | using OpenSim.Region.Framework.Scenes; | ||
48 | using OpenSim.Region.Framework.Interfaces; | ||
49 | using OpenSim.Tests.Common; | ||
50 | using OpenSim.Tests.Common.Mock; | ||
51 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
52 | |||
53 | namespace OpenSim.Region.Framework.Scenes.Tests | ||
54 | { | ||
55 | [TestFixture] | ||
56 | public class ScenePresenceCapabilityTests : OpenSimTestCase | ||
57 | { | ||
58 | [Test] | ||
59 | public void TestChildAgentSingleRegionCapabilities() | ||
60 | { | ||
61 | TestHelpers.InMethod(); | ||
62 | // TestHelpers.EnableLogging(); | ||
63 | |||
64 | UUID spUuid = TestHelpers.ParseTail(0x1); | ||
65 | |||
66 | // XXX: This is not great since the use of statics will mean that this has to be manually cleaned up for | ||
67 | // any subsequent test. | ||
68 | // XXX: May replace with a mock IHttpServer later. | ||
69 | BaseHttpServer httpServer = new BaseHttpServer(99999); | ||
70 | MainServer.AddHttpServer(httpServer); | ||
71 | MainServer.Instance = httpServer; | ||
72 | |||
73 | CapabilitiesModule capsMod = new CapabilitiesModule(); | ||
74 | TestScene scene = new SceneHelpers().SetupScene(); | ||
75 | SceneHelpers.SetupSceneModules(scene, capsMod); | ||
76 | |||
77 | ScenePresence sp = SceneHelpers.AddChildScenePresence(scene, spUuid); | ||
78 | //Assert.That(capsMod.GetCapsForUser(spUuid), Is.Not.Null); | ||
79 | |||
80 | // TODO: Need to add tests for other ICapabiltiesModule methods. | ||
81 | |||
82 | scene.IncomingCloseAgent(sp.UUID, false); | ||
83 | //Assert.That(capsMod.GetCapsForUser(spUuid), Is.Null); | ||
84 | |||
85 | // TODO: Need to add tests for other ICapabiltiesModule methods. | ||
86 | } | ||
87 | } | ||
88 | } | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs index 8775949..5df9aba 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCrossingTests.cs | |||
@@ -95,11 +95,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
95 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); | 95 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); |
96 | 96 | ||
97 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); | 97 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); |
98 | TestClient tc = new TestClient(acd, sceneA, sh.SceneManager); | 98 | TestClient tc = new TestClient(acd, sceneA); |
99 | List<TestClient> destinationTestClients = new List<TestClient>(); | 99 | List<TestClient> destinationTestClients = new List<TestClient>(); |
100 | EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients); | 100 | EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients); |
101 | 101 | ||
102 | ScenePresence originalSp = SceneHelpers.AddScenePresence(sceneA, tc, acd, sh.SceneManager); | 102 | ScenePresence originalSp = SceneHelpers.AddScenePresence(sceneA, tc, acd); |
103 | originalSp.AbsolutePosition = new Vector3(128, 32, 10); | 103 | originalSp.AbsolutePosition = new Vector3(128, 32, 10); |
104 | 104 | ||
105 | // originalSp.Flying = true; | 105 | // originalSp.Flying = true; |
@@ -112,6 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
112 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); | 112 | //moveArgs.BodyRotation = Quaternion.CreateFromEulers(Vector3.Zero); |
113 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); | 113 | moveArgs.BodyRotation = Quaternion.CreateFromEulers(new Vector3(0, 0, (float)-(Math.PI / 2))); |
114 | moveArgs.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; | 114 | moveArgs.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; |
115 | moveArgs.SessionID = acd.SessionID; | ||
115 | 116 | ||
116 | originalSp.HandleAgentUpdate(originalSp.ControllingClient, moveArgs); | 117 | originalSp.HandleAgentUpdate(originalSp.ControllingClient, moveArgs); |
117 | 118 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index de4458d..afd2779 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -136,10 +136,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
136 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); | 136 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); |
137 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 137 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
138 | 138 | ||
139 | // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour | ||
140 | lscm.ServiceVersion = "SIMULATION/0.1"; | ||
141 | |||
139 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 142 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
140 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 143 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
141 | 144 | ||
142 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId, sh.SceneManager); | 145 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId); |
143 | sp.AbsolutePosition = new Vector3(30, 31, 32); | 146 | sp.AbsolutePosition = new Vector3(30, 31, 32); |
144 | 147 | ||
145 | List<TestClient> destinationTestClients = new List<TestClient>(); | 148 | List<TestClient> destinationTestClients = new List<TestClient>(); |
@@ -224,7 +227,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
224 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 227 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
225 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 228 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
226 | 229 | ||
227 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId, sh.SceneManager); | 230 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId); |
228 | sp.AbsolutePosition = preTeleportPosition; | 231 | sp.AbsolutePosition = preTeleportPosition; |
229 | 232 | ||
230 | // Make sceneB return false on query access | 233 | // Make sceneB return false on query access |
@@ -300,7 +303,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
300 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 303 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
301 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 304 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
302 | 305 | ||
303 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId, sh.SceneManager); | 306 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId); |
304 | sp.AbsolutePosition = preTeleportPosition; | 307 | sp.AbsolutePosition = preTeleportPosition; |
305 | 308 | ||
306 | // Make sceneB refuse CreateAgent | 309 | // Make sceneB refuse CreateAgent |
@@ -389,7 +392,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
389 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 392 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
390 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 393 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
391 | 394 | ||
392 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId, sh.SceneManager); | 395 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId); |
393 | sp.AbsolutePosition = preTeleportPosition; | 396 | sp.AbsolutePosition = preTeleportPosition; |
394 | 397 | ||
395 | sceneA.RequestTeleportLocation( | 398 | sceneA.RequestTeleportLocation( |
@@ -428,7 +431,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
428 | public void TestSameSimulatorNeighbouringRegions() | 431 | public void TestSameSimulatorNeighbouringRegions() |
429 | { | 432 | { |
430 | TestHelpers.InMethod(); | 433 | TestHelpers.InMethod(); |
431 | TestHelpers.EnableLogging(); | 434 | // TestHelpers.EnableLogging(); |
432 | 435 | ||
433 | UUID userId = TestHelpers.ParseTail(0x1); | 436 | UUID userId = TestHelpers.ParseTail(0x1); |
434 | 437 | ||
@@ -454,15 +457,18 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
454 | SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA); | 457 | SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA); |
455 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); | 458 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); |
456 | 459 | ||
460 | // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour | ||
461 | lscm.ServiceVersion = "SIMULATION/0.1"; | ||
462 | |||
457 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 463 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
458 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 464 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
459 | 465 | ||
460 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); | 466 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); |
461 | TestClient tc = new TestClient(acd, sceneA, sh.SceneManager); | 467 | TestClient tc = new TestClient(acd, sceneA); |
462 | List<TestClient> destinationTestClients = new List<TestClient>(); | 468 | List<TestClient> destinationTestClients = new List<TestClient>(); |
463 | EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients); | 469 | EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients); |
464 | 470 | ||
465 | ScenePresence beforeSceneASp = SceneHelpers.AddScenePresence(sceneA, tc, acd, sh.SceneManager); | 471 | ScenePresence beforeSceneASp = SceneHelpers.AddScenePresence(sceneA, tc, acd); |
466 | beforeSceneASp.AbsolutePosition = new Vector3(30, 31, 32); | 472 | beforeSceneASp.AbsolutePosition = new Vector3(30, 31, 32); |
467 | 473 | ||
468 | Assert.That(beforeSceneASp, Is.Not.Null); | 474 | Assert.That(beforeSceneASp, Is.Not.Null); |