From 056a6ee7653b17d8c1d92519f34f029bcd602143 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 26 Jul 2013 19:22:30 +0100
Subject: Fix regression tests relating to agent transfer by making simulator
use last week's SIMULATOR/0.1 protocol for now.
---
.../Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 9 +++++++++
.../Simulation/LocalSimulationConnector.cs | 13 +++++++++----
.../Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 6 ++++++
3 files changed, 24 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 508743c..4ecae73 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -38,6 +38,8 @@ using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
+using OpenSim.Framework.Servers;
+using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.CoreModules.Avatar.Attachments;
using OpenSim.Region.CoreModules.Framework;
using OpenSim.Region.CoreModules.Framework.EntityTransfer;
@@ -802,6 +804,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
+ BaseHttpServer httpServer = new BaseHttpServer(99999);
+ MainServer.AddHttpServer(httpServer);
+ MainServer.Instance = httpServer;
+
AttachmentsModule attModA = new AttachmentsModule();
AttachmentsModule attModB = new AttachmentsModule();
EntityTransferModule etmA = new EntityTransferModule();
@@ -830,6 +836,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
SceneHelpers.SetupSceneModules(
sceneB, config, new CapabilitiesModule(), etmB, attModB, new BasicInventoryAccessModule());
+ // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
+ lscm.ServiceVersion = "SIMULATION/0.1";
+
UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(sceneA, 0x1);
AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 7dd10f7..bee602e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -46,9 +46,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
- /// Version of this service
+ /// Version of this service.
///
- private const string m_Version = "SIMULATION/0.2";
+ ///
+ /// Currently valid versions are "SIMULATION/0.1" and "SIMULATION/0.2"
+ ///
+ public string ServiceVersion { get; set; }
///
/// Map region ID to scene.
@@ -64,6 +67,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public void Initialise(IConfigSource config)
{
+ ServiceVersion = "SIMULATION/0.2";
+
IConfig moduleConfig = config.Configs["Modules"];
if (moduleConfig != null)
{
@@ -253,7 +258,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
{
reason = "Communications failure";
- version = m_Version;
+ version = ServiceVersion;
if (destination == null)
return false;
@@ -359,4 +364,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
#endregion
}
-}
+}
\ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index 297c66b..afd2779 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -136,6 +136,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
SceneHelpers.SetupSceneModules(sceneB, config, etmB);
SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
+ // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
+ lscm.ServiceVersion = "SIMULATION/0.1";
+
Vector3 teleportPosition = new Vector3(10, 11, 12);
Vector3 teleportLookAt = new Vector3(20, 21, 22);
@@ -454,6 +457,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA);
SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB);
+ // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
+ lscm.ServiceVersion = "SIMULATION/0.1";
+
Vector3 teleportPosition = new Vector3(10, 11, 12);
Vector3 teleportLookAt = new Vector3(20, 21, 22);
--
cgit v1.1