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.
bullet-2.82
Justin Clark-Casey (justincc) 2014-05-22 19:47:33 +01:00
parent 1b156b7fe8
commit 65a135f4d3
2 changed files with 11 additions and 8 deletions

View File

@ -121,18 +121,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
sp1.Flying = true; sp1.Flying = true;
sp1.AbsolutePosition = sp1Position; sp1.AbsolutePosition = sp1Position;
AgentCircuitData acd = SceneHelpers.GenerateAgentData(sp2Uuid); ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, sp2Uuid);
TestClient tc = new TestClient(acd, sceneEast);
List<TestClient> destinationTestClients = new List<TestClient>();
EntityTransferHelpers.SetupInformClientOfNeighbourTriggersNeighbourClientCreate(tc, destinationTestClients);
ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, tc, acd);
TestClient sp2Client = (TestClient)sp2.ControllingClient; TestClient sp2Client = (TestClient)sp2.ControllingClient;
// When sp2 logs in to sceneWest, it sets up a child agent in sceneEast and informs the sp2 client to
// make the connection. For this test, will simplify this chain by making the connection separately here.
ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneEast, sp2Uuid);
sp2.Flying = true; sp2.Flying = true;
sp2.AbsolutePosition = sp2Position; sp2.AbsolutePosition = sp2Position;
TestClient sp2ChildClient = destinationTestClients[0]; TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient;
// We must update the scene in order to make the new root agent sp2 in sceneWest trigger a position update to its // We must update the scene in order to make the new root agent sp2 in sceneWest trigger a position update to its
// child in sceneEast. // child in sceneEast.

View File

@ -574,7 +574,11 @@ namespace OpenSim.Tests.Common
public static ScenePresence AddChildScenePresence(Scene scene, UUID agentId) public static ScenePresence AddChildScenePresence(Scene scene, UUID agentId)
{ {
AgentCircuitData acd = GenerateAgentData(agentId); return AddChildScenePresence(scene, GenerateAgentData(agentId));
}
public static ScenePresence AddChildScenePresence(Scene scene, AgentCircuitData acd)
{
acd.child = true; acd.child = true;
// XXX: ViaLogin may not be correct for child agents // XXX: ViaLogin may not be correct for child agents