diff options
author | Melanie | 2013-08-13 22:53:47 +0100 |
---|---|---|
committer | Melanie | 2013-08-13 22:53:47 +0100 |
commit | 4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6 (patch) | |
tree | 245e7c3257c8c6c29356ba5c1eb61ae50a127226 /OpenSim/Tests/Common | |
parent | Merge branch 'master' into careminster (diff) | |
parent | minor: Eliminate one of the duplicate 'have's in the HG message telling the u... (diff) | |
download | opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.zip opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.tar.gz opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.tar.bz2 opensim-SC_OLD-4a6eff1ee83f88a188936a1a0d4a2c55924ef1c6.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Tests/Common')
-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 df8cf27..e8520f2 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 | ||
@@ -475,7 +480,8 @@ namespace OpenSim.Tests.Common.Mock | |||
475 | 480 | ||
476 | public void CompleteMovement() | 481 | public void CompleteMovement() |
477 | { | 482 | { |
478 | OnCompleteMovementToRegion(this, true); | 483 | if (OnCompleteMovementToRegion != null) |
484 | OnCompleteMovementToRegion(this, true); | ||
479 | } | 485 | } |
480 | 486 | ||
481 | /// <summary> | 487 | /// <summary> |
@@ -615,21 +621,25 @@ namespace OpenSim.Tests.Common.Mock | |||
615 | OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint); | 621 | OnTestClientInformClientOfNeighbour(neighbourHandle, neighbourExternalEndPoint); |
616 | } | 622 | } |
617 | 623 | ||
618 | public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | 624 | public virtual void SendRegionTeleport( |
619 | uint locationID, uint flags, string capsURL) | 625 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
626 | uint locationID, uint flags, string capsURL) | ||
620 | { | 627 | { |
621 | m_log.DebugFormat("[TEST CLIENT]: Received SendRegionTeleport"); | 628 | m_log.DebugFormat( |
629 | "[TEST CLIENT]: Received SendRegionTeleport for {0} {1} on {2}", m_firstName, m_lastName, m_scene.Name); | ||
622 | 630 | ||
623 | CapsSeedUrl = capsURL; | 631 | CapsSeedUrl = capsURL; |
624 | 632 | ||
625 | // We don't do this here so that the source region can complete processing first in a single-threaded | 633 | if (OnTestClientSendRegionTeleport != null) |
626 | // regression test scenario. The test itself will have to call CompleteTeleportClientSide() after a teleport | 634 | OnTestClientSendRegionTeleport( |
627 | // CompleteTeleportClientSide(); | 635 | regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL); |
628 | } | 636 | } |
629 | 637 | ||
630 | public virtual void SendTeleportFailed(string reason) | 638 | public virtual void SendTeleportFailed(string reason) |
631 | { | 639 | { |
632 | m_log.DebugFormat("[TEST CLIENT]: Teleport failed with reason {0}", reason); | 640 | m_log.DebugFormat( |
641 | "[TEST CLIENT]: Teleport failed for {0} {1} on {2} with reason {3}", | ||
642 | m_firstName, m_lastName, m_scene.Name, reason); | ||
633 | } | 643 | } |
634 | 644 | ||
635 | public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, | 645 | public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, |