diff options
author | Justin Clark-Casey (justincc) | 2014-05-22 19:47:33 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-05-22 19:47:33 +0100 |
commit | 65a135f4d33fc0be3738f11c51a6c27c344a10aa (patch) | |
tree | 83f602ddd569ee724196dca7515801ffc3664f3b /OpenSim | |
parent | Add regression test for in-range chat between neighbouring regions from east ... (diff) | |
download | opensim-SC_OLD-65a135f4d33fc0be3738f11c51a6c27c344a10aa.zip opensim-SC_OLD-65a135f4d33fc0be3738f11c51a6c27c344a10aa.tar.gz opensim-SC_OLD-65a135f4d33fc0be3738f11c51a6c27c344a10aa.tar.bz2 opensim-SC_OLD-65a135f4d33fc0be3738f11c51a6c27c344a10aa.tar.xz |
Simplify regression TestInterRegionChatDistanceEastWest() by making the child presence connection directly rather than routing through TestClient.
This code isn't relevant to this test and is already exercised by other tests.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs | 13 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 6 |
2 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs index 315cc19..c5eb2ad 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs | |||
@@ -121,18 +121,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests | |||
121 | sp1.Flying = true; | 121 | sp1.Flying = true; |
122 | sp1.AbsolutePosition = sp1Position; | 122 | sp1.AbsolutePosition = sp1Position; |
123 | 123 | ||
124 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(sp2Uuid); | 124 | ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, sp2Uuid); |
125 | TestClient tc = new TestClient(acd, sceneEast); | ||
126 | List<TestClient> destinationTestClients = new List<TestClient>(); | ||
127 | EntityTransferHelpers.SetupInformClientOfNeighbourTriggersNeighbourClientCreate(tc, destinationTestClients); | ||
128 | |||
129 | ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, tc, acd); | ||
130 | TestClient sp2Client = (TestClient)sp2.ControllingClient; | 125 | TestClient sp2Client = (TestClient)sp2.ControllingClient; |
131 | 126 | ||
127 | // When sp2 logs in to sceneWest, it sets up a child agent in sceneEast and informs the sp2 client to | ||
128 | // make the connection. For this test, will simplify this chain by making the connection separately here. | ||
129 | ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneEast, sp2Uuid); | ||
130 | |||
132 | sp2.Flying = true; | 131 | sp2.Flying = true; |
133 | sp2.AbsolutePosition = sp2Position; | 132 | sp2.AbsolutePosition = sp2Position; |
134 | 133 | ||
135 | TestClient sp2ChildClient = destinationTestClients[0]; | 134 | TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient; |
136 | 135 | ||
137 | // We must update the scene in order to make the new root agent sp2 in sceneWest trigger a position update to its | 136 | // We must update the scene in order to make the new root agent sp2 in sceneWest trigger a position update to its |
138 | // child in sceneEast. | 137 | // child in sceneEast. |
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 874ff62..342cd06 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -574,7 +574,11 @@ namespace OpenSim.Tests.Common | |||
574 | 574 | ||
575 | public static ScenePresence AddChildScenePresence(Scene scene, UUID agentId) | 575 | public static ScenePresence AddChildScenePresence(Scene scene, UUID agentId) |
576 | { | 576 | { |
577 | AgentCircuitData acd = GenerateAgentData(agentId); | 577 | return AddChildScenePresence(scene, GenerateAgentData(agentId)); |
578 | } | ||
579 | |||
580 | public static ScenePresence AddChildScenePresence(Scene scene, AgentCircuitData acd) | ||
581 | { | ||
578 | acd.child = true; | 582 | acd.child = true; |
579 | 583 | ||
580 | // XXX: ViaLogin may not be correct for child agents | 584 | // XXX: ViaLogin may not be correct for child agents |