On SceneSetupHelpers, go back to calling ScenePresence.CompleteMovement() for the last stage of AddRootAgent() instead of SP.MakeRootAgent()
Going this extra step doesn't appear to cause any test failures. This is arguably better for test purposes, though at some stage another method may arise which does just call AddRootAgent().0.7.1-dev
parent
023f953f39
commit
eb699df5f6
|
@ -172,25 +172,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
|
|
||||||
Assert.That(neighbours.Count, Is.EqualTo(2));
|
Assert.That(neighbours.Count, Is.EqualTo(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fixNullPresence()
|
|
||||||
{
|
|
||||||
string firstName = "testfirstname";
|
|
||||||
|
|
||||||
AgentCircuitData agent = new AgentCircuitData();
|
|
||||||
agent.AgentID = agent1;
|
|
||||||
agent.firstname = firstName;
|
|
||||||
agent.lastname = "testlastname";
|
|
||||||
agent.SessionID = UUID.Zero;
|
|
||||||
agent.SecureSessionID = UUID.Zero;
|
|
||||||
agent.circuitcode = 123;
|
|
||||||
agent.BaseFolder = UUID.Zero;
|
|
||||||
agent.InventoryFolder = UUID.Zero;
|
|
||||||
agent.startpos = Vector3.Zero;
|
|
||||||
agent.CapsPath = GetRandomCapsObjectPath();
|
|
||||||
|
|
||||||
acd1 = agent;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void T013_TestRemoveNeighbourRegion()
|
public void T013_TestRemoveNeighbourRegion()
|
||||||
|
@ -208,6 +189,28 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
CompleteAvatarMovement
|
CompleteAvatarMovement
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test that if a root agent logs into a region, a child agent is also established in the neighbouring region
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Please note that unlike the other tests here, this doesn't rely on structures
|
||||||
|
/// </remarks>
|
||||||
|
[Test]
|
||||||
|
public void TestChildAgentEstablished()
|
||||||
|
{
|
||||||
|
UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
|
||||||
|
|
||||||
|
TestScene myScene1 = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
|
||||||
|
TestScene myScene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
|
||||||
|
|
||||||
|
SceneSetupHelpers.AddRootAgent(myScene1, agent1Id);
|
||||||
|
ScenePresence childPresence = myScene2.GetScenePresence(agent1);
|
||||||
|
|
||||||
|
// TODO: Need to do a fair amount of work to allow synchronous establishment of child agents
|
||||||
|
// Assert.That(childPresence, Is.Not.Null);
|
||||||
|
// Assert.That(childPresence.IsChildAgent, Is.True);
|
||||||
|
}
|
||||||
|
|
||||||
// I'm commenting this test, because this is not supposed to happen here
|
// I'm commenting this test, because this is not supposed to happen here
|
||||||
//[Test]
|
//[Test]
|
||||||
|
@ -330,7 +333,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected.");
|
Assert.That(presence2.IsChildAgent, Is.True, "Did not return from region as expected.");
|
||||||
Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");
|
Assert.That(presence.IsChildAgent, Is.False, "Presence was not made root in old region again.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void fixNullPresence()
|
||||||
|
{
|
||||||
|
string firstName = "testfirstname";
|
||||||
|
|
||||||
|
AgentCircuitData agent = new AgentCircuitData();
|
||||||
|
agent.AgentID = agent1;
|
||||||
|
agent.firstname = firstName;
|
||||||
|
agent.lastname = "testlastname";
|
||||||
|
agent.SessionID = UUID.Zero;
|
||||||
|
agent.SecureSessionID = UUID.Zero;
|
||||||
|
agent.circuitcode = 123;
|
||||||
|
agent.BaseFolder = UUID.Zero;
|
||||||
|
agent.InventoryFolder = UUID.Zero;
|
||||||
|
agent.startpos = Vector3.Zero;
|
||||||
|
agent.CapsPath = GetRandomCapsObjectPath();
|
||||||
|
|
||||||
|
acd1 = agent;
|
||||||
|
}
|
||||||
|
|
||||||
public static string GetRandomCapsObjectPath()
|
public static string GetRandomCapsObjectPath()
|
||||||
{
|
{
|
||||||
UUID caps = UUID.Random();
|
UUID caps = UUID.Random();
|
||||||
|
|
|
@ -504,12 +504,10 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
TestClient client = new TestClient(agentData, scene);
|
TestClient client = new TestClient(agentData, scene);
|
||||||
scene.AddNewClient(client);
|
scene.AddNewClient(client);
|
||||||
|
|
||||||
// Stage 3: Invoke agent crossing, which converts the child agent into a root agent (with appearance,
|
// Stage 3: Complete the entrance into the region. This converts the child agent into a root agent.
|
||||||
// inventory, etc.)
|
|
||||||
//scene.AgentCrossing(agentData.AgentID, new Vector3(90, 90, 90), false); OBSOLETE
|
|
||||||
|
|
||||||
ScenePresence scp = scene.GetScenePresence(agentData.AgentID);
|
ScenePresence scp = scene.GetScenePresence(agentData.AgentID);
|
||||||
scp.MakeRootAgent(new Vector3(90, 90, 90), true);
|
scp.CompleteMovement(client);
|
||||||
|
//scp.MakeRootAgent(new Vector3(90, 90, 90), true);
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue