diff options
author | Justin Clark-Casey (justincc) | 2013-08-12 18:15:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-12 18:15:12 +0100 |
commit | b64d3ecaed2c4cc0ffab2e44d02745de4e8f5717 (patch) | |
tree | 24fe10118f4a851ad11842c2150be56d84bfaed4 /OpenSim/Tests | |
parent | Stats treaking. Update ToOSDMap for Stat and PercentageStat to return (diff) | |
download | opensim-SC_OLD-b64d3ecaed2c4cc0ffab2e44d02745de4e8f5717.zip opensim-SC_OLD-b64d3ecaed2c4cc0ffab2e44d02745de4e8f5717.tar.gz opensim-SC_OLD-b64d3ecaed2c4cc0ffab2e44d02745de4e8f5717.tar.bz2 opensim-SC_OLD-b64d3ecaed2c4cc0ffab2e44d02745de4e8f5717.tar.xz |
Create TestSameSimulatorNeighbouringRegionsTeleportV2() regression test for V2 transfer protocol.
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index f7220d7..9370102 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -61,8 +61,13 @@ namespace OpenSim.Tests.Common.Mock | |||
61 | // Test client specific events - for use by tests to implement some IClientAPI behaviour. | 61 | // Test client specific events - for use by tests to implement some IClientAPI behaviour. |
62 | public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion; | 62 | public event Action<RegionInfo, Vector3, Vector3> OnReceivedMoveAgentIntoRegion; |
63 | public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour; | 63 | public event Action<ulong, IPEndPoint> OnTestClientInformClientOfNeighbour; |
64 | public event TestClientOnSendRegionTeleportDelegate OnTestClientSendRegionTeleport; | ||
64 | public event Action<GridInstantMessage> OnReceivedInstantMessage; | 65 | public event Action<GridInstantMessage> OnReceivedInstantMessage; |
65 | 66 | ||
67 | public delegate void TestClientOnSendRegionTeleportDelegate( | ||
68 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | ||
69 | uint locationID, uint flags, string capsURL); | ||
70 | |||
66 | // disable warning: public events, part of the public API | 71 | // disable warning: public events, part of the public API |
67 | #pragma warning disable 67 | 72 | #pragma warning disable 67 |
68 | 73 | ||
@@ -472,7 +477,8 @@ namespace OpenSim.Tests.Common.Mock | |||
472 | 477 | ||
473 | public void CompleteMovement() | 478 | public void CompleteMovement() |
474 | { | 479 | { |
475 | OnCompleteMovementToRegion(this, true); | 480 | if (OnCompleteMovementToRegion != null) |
481 | OnCompleteMovementToRegion(this, true); | ||
476 | } | 482 | } |
477 | 483 | ||
478 | /// <summary> | 484 | /// <summary> |
@@ -608,21 +614,25 @@ namespace OpenSim.Tests.Common.Mock | |||
608 | OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint); | 614 | OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint); |
609 | } | 615 | } |
610 | 616 | ||
611 | public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | 617 | public virtual void SendRegionTeleport( |
612 | uint locationID, uint flags, string capsURL) | 618 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
619 | uint locationID, uint flags, string capsURL) | ||
613 | { | 620 | { |
614 | m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport"); | 621 | m_log.DebugFormat( |
622 | "[TEST CLIENT]: Received SendRegionTeleport for {0} {1} on {2}", m_firstName, m_lastName, m_scene.Name); | ||
615 | 623 | ||
616 | CapsSeedUrl = capsURL; | 624 | CapsSeedUrl = capsURL; |
617 | 625 | ||
618 | // We don't do this here so that the source region can complete processing first in a single-threaded | 626 | if (OnTestClientSendRegionTeleport != null) |
619 | // regression test scenario. The test itself will have to call CompleteTeleportClientSide() after a teleport | 627 | OnTestClientSendRegionTeleport( |
620 | // CompleteTeleportClientSide(); | 628 | regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL); |
621 | } | 629 | } |
622 | 630 | ||
623 | public virtual void SendTeleportFailed(string reason) | 631 | public virtual void SendTeleportFailed(string reason) |
624 | { | 632 | { |
625 | m_log.DebugFormat("[TEST CLIENT]: Teleport failed with reason {0}", reason); | 633 | m_log.DebugFormat( |
634 | "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}", | ||
635 | m_firstName, m_lastName, m_scene.Name, reason); | ||
626 | } | 636 | } |
627 | 637 | ||
628 | public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, | 638 | public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, |