Create TestSameSimulatorNeighbouringRegionsTeleportV2() regression test for V2 transfer protocol.

This commit is contained in:
Justin Clark-Casey (justincc)
2013-08-12 18:15:12 +01:00
parent 216f5afe54
commit b64d3ecaed
2 changed files with 130 additions and 9 deletions

View File

@@ -61,8 +61,13 @@ namespace OpenSim.Tests.Common.Mock
// Test client specific events - for use by tests to implement some IClientAPI behaviour.
public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion;
public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour;
public event TestClientOnSendRegionTeleportDelegate OnTestClientSendRegionTeleport;
public event Action<GridInstantMessage> OnReceivedInstantMessage;
public delegate void TestClientOnSendRegionTeleportDelegate(
ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
uint locationID, uint flags, string capsURL);
// disable warning: public events, part of the public API
#pragma warning disable 67
@@ -472,7 +477,8 @@ namespace OpenSim.Tests.Common.Mock
public void CompleteMovement()
{
OnCompleteMovementToRegion(this, true);
if (OnCompleteMovementToRegion != null)
OnCompleteMovementToRegion(this, true);
}
/// <summary>
@@ -608,21 +614,25 @@ namespace OpenSim.Tests.Common.Mock
OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint);
}
public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
uint locationID, uint flags, string capsURL)
public virtual void SendRegionTeleport(
ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
uint locationID, uint flags, string capsURL)
{
m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport");
m_log.DebugFormat(
"[TEST CLIENT]: Received SendRegionTeleport for {0} {1} on {2}", m_firstName, m_lastName, m_scene.Name);
CapsSeedUrl = capsURL;
// We don't do this here so that the source region can complete processing first in a single-threaded
// regression test scenario. The test itself will have to call CompleteTeleportClientSide() after a teleport
// CompleteTeleportClientSide();
if (OnTestClientSendRegionTeleport != null)
OnTestClientSendRegionTeleport(
regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL);
}
public virtual void SendTeleportFailed(string reason)
{
m_log.DebugFormat("[TEST CLIENT]: Teleport failed with reason {0}", reason);
m_log.DebugFormat(
"[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}",
m_firstName, m_lastName, m_scene.Name, reason);
}
public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,